Not all units can charge. The most common reason for a unit being unable to charge is because it is already fighting in close combat, but other circumstances, such as fleeing, or the effect of a special rule, can also prevent a unit from declaring a charge. These other situations are fairly rare, and they will be clearly explained when you encounter them.
A unit cannot declare an impossible charge – i.e. one that it cannot possibly complete, either because the enemy unit is outside of the chargers' maximum possible charge range, or because intervening obstructions (such as other units or impassable terrain) make it impossible for the unit to make a charge move that allows it to move into contact. Note that if such obstruction is another unit, and there is a chance that the intervening unit will move out of the chargers' way before the charge is completed, the charge is 'possible', and therefore can be declared (remember that you still need to see the target to declare the charge though).
To make such a judgement, you'll need to know how a charge move is completed, which is discussed later.