The pitot tube senses ram air pressure; static ports sense the still air pressure around the aircraft. The airspeed indicator uses both; the altimeter and vertical speed indicator use static only. If the static ports block, the altimeter freezes at the altitude where it happened and the VSI reads zero; an alternate static source (often inside the cabin) can be selected. For IFR flight in controlled airspace the altimeter and static system must have been tested within 24 calendar months, and every transponder within 24 calendar months too.
Airspeed markings: white arc flap operating range, green arc normal operating range, yellow arc caution (smooth air only), and a red line never-exceed speed. On engine instruments a red line marks a limit, green the normal range and yellow a caution range.
Gyros and the compass
The attitude indicator, heading indicator and turn coordinator use gyroscopes spun by air (a vacuum system) or electricity. The magnetic compass is swung after work that could change its errors, and a deviation card records the corrections.
Avionics and wiring
Radios need good bonding (metal parts connected so they're at the same potential) to cut noise and protect against lightning and static; static wicks on trailing edges bleed off static charge. Wiring is sized for its current and voltage drop, supported by clamps at set intervals, kept clear of moving parts, and routed above fluid lines (never clamped to them), so a leak can't drip on it. Most aircraft need ADS-B Out to fly in busy US airspace. An ELT (emergency locator transmitter) is inspected every 12 calendar months, and its battery replaced after one hour of total use or half its useful life.
One limit to remember: an A&P may not repair or alter instruments themselves. They remove and install them, and a repair station repairs them.
Practice
Which instrument uses both pitot and static pressure?
More info
Quick reference
Pitot / static
Ram pressure / still air pressure.
Altimeter, VSI
Static only.
Airspeed arcs
White flaps, green normal, yellow caution, red line never exceed.
91.411 / 91.413
Altimeter and static test / transponder test: 24 calendar months.
Bonding
Connecting metal parts to the same potential; cuts noise and static.
ELT
Inspected every 12 months; battery after 1 hour of use or half its life.