Using variables in Logic Editor
you can add custom properties to any object in your scene to store simple data types like an integer,string,boolean,float or a timer variable.  

The property sensor allow you to test their values , and the property actuator to affect to them new values.
the controller can do logic operations to combine tests and trigger different actuators.  

for complex data types , like arrays and structures, you have to use a python script.