A solenoid is an electromagnet that can pull and hold a piston through a cylinder. Solenoids are used in starter relays.