What happens when an airplane gets struck by lightning?
The vast majority of aircraft require an inspection, from small Cessna singles to Boeing airliners. Usually, they require at the very least:


A visual inspection of the aircraft for damage, particularly the nose, tail section and wingtips. Most of the time, the damage is easily visible as "burn" marks or erosion of parts of the skin.
A check of the communication/navigation systems, both visually and functional testing
A check of all avionics, including GPS systems
Propeller should be removed and inspected by an A/P for damage
Engine should be inspected by a procedure similar to the following:


Remove the engine from the aircraft and disassemble it.
Inspect the engine for arcing and heat damage to the crankshaft,
main bearings, counterweights, camshaft lobes, bearings, gear teeth
and any other parts applicable to your engine. Any magnetic parts
should be degaussed following the specific procedure in your manual.
Measure each other part to make sure it is within tolerances for your engine.
Reassemble, then install the engine.

(depends on company) Send in an lightning strike report to your manufacturer
Confirmation of compass being within 10 degrees of another (stricter for transport low visibility operations) after completion of repair/inspection works


Sources:


Cessna 172R Maintenance Manual
Aero Magazine -- Lightning Strikes: Protection, Inspection, and Repair (Boeing, Q4 2012)
Continental Maintenance and Overhaul Manual: M-18