A solenoid is an ElectroMagnet with a moving core. When the magnet is energised, the movement of the coil is used for work.
This could be used for example for electrically operated bolts - which slide out when the magnet is energised.
Solenoid valves are extremely useful, and at the moment fairly hard to get hold of on the scale I need. A basic one of these would be a very welcome addition to the Lego range.
Fischertechnik do a small solenoid 3/2 in their 34948 Pneumatic Robots Kit which is around £89.00.
It is also available as a spare 35327 £9.80. It is about 15 x 20 mm with push on fittings. They charge £2.00 P&P for spares and £5 for kits.
An alternative is the Techno Stuff AirSol - which was a brick compatible with a solenoid - but it looks less of a neat solution than the FischerTechnik. At about £25 ($44) the AirSol was more expensive as well.