What is "state"?

So while typing a variable name I had put in the word "state" and it came out in orange, so what is state used in?

It has no special meaning in C/C++

Library authors can define keywords for their libraries, which are highlighted in special colors by the Arduino IDE. Unfortunately, the Arduino IDE has no system for only highlighting the keywords for the libraries you're using in your sketch. So any time you type any keyword from any library you have installed, it will be colored orange, etc. This can get pretty hectic when you have a ton of libraries installed.

You should not put too much importance on the keyword highlighting in the Arduino IDE. You will find that quite a few 3rd party libraries don't have any keyword highlighting at all, or incomplete keyword highlighting. This is because the author either didn't bother to define the keyword or did it incorrectly. Don't assume that every word that turns orange is verboten for your own names. That is only the case if you happen to be using the library that defined that particular keyword.