While recognizing a face or kicking a ball may seem to be easy tasks for us, they still constitute challenging problems for even the most sophisticated computer algorithms available nowadays. The brain has evolved complex mechanisms to encode behaviorally relevant information. Here we review the types of codes used by the brain, what their constraints are and how they map the sensory environment or the motor output. We start by defining neural codes and briefly describing some of the current tools available to record activity from the brain. We give several examples of coding strategies used by different systems and multiple organisms and discuss how spiking patterns can be read out. Going beyond correlations between physiology and stimuli,...