Along with TUs, a unit's Reaction rating is one of the most vital resources a unit can have in combat.
In a nutshell, Reactions influences precedence. Who gets priority to make their move. It is used offensively and defensively.
The side that's currently issueing orders (the attacker) uses reactions to prevent opportunity shots while the waiting side (the defender) uses reactions to get shots of opportunity.
The Reaction stat is improved by performing opportunity shots.
Reaction shots are performed differently by player controlled units and AI controlled units. Player controlled units will only ever use Snap Shots, while the AI has the additional option of using Auto Shots.
When two opposing units are within range of each other, the Reaction level of both units are compared. The unit with the highest Reactions gets to make the move. If the defender is not aware of the attacker, no check is made. However, as soon as the defender is made aware of the attacker, a check is made and will then perform an attack of opportunity if the conditions for a reaction shot are satisfied. Note that if an attacker with lower reactions is exposed to a defender with high reaction due to the actions of another unit (such as shooting away a wall), the check is not made and the exposed attacker is not fired upon. However, the moment the exposed attacker moves, the defender will be able to obtain an attack of opportunity given the right conditions.
What is not common knowledge is how the overall reaction level of any given unit is also influenced by the percentage of the unit's remaining TUs! So say an alien has 100 reactions but only has 60% of its remaining TUs. Its actual Reaction level is really 60, not 100. If it takes a Snap Shot, which costs 30% for any plasma weapon, the remaining TU percentage will drop to 30%, and so will the Reaction level.
With this in mind, one could say that to get the best out of an attack of opportunity, one should always end the turn with full TUs and weild a weapon that has a low snapshot cost. The Pistol, Laser Pistol and the Laser Rifle are by far the best weapons in the entire X-COM arsenal to use for attacks of opportunity.
For melee attacks, it is often best to use a mind probe to examine the stats of any alien that you wish to approach. By getting an overall impression of the alien's remaining TUs and its reaction level, you can get a good idea of how safe the alien will be to approach.