Electric guitar: A physical instrument; metal strings vibrate over magnetic pickups, sending an electrical signal to an amplifier that produces sound.
Air guitar: An imaginary instrument; the performer mimes playing motions without any strings, pickups, or sound production. It's a performance art, not a musical instrument.
One makes music; the other performs the idea of making music.