Walk up to the vehicle and press the context action button — A on Xbox 360, X on PlayStation 3. The same button gets you back out.
If nothing happens, you are probably a fraction too far away or standing at the wrong corner of the hull. Modern Combat is fussier about this than the PC Battlefield games, so circle the vehicle until the prompt appears.
One quirk of this title: it is not a PC-style combined-arms sandbox, so vehicle use is scripted into specific sections rather than being freely available everywhere on the map.