How does a solenoid valve work?

1. Valve Body
2. Inlet Port
3. Outlet Port
4. Coil / Solenoid
5. Coil Windings
6. Lead Wires
7. Plunger
8. Spring
9. Orifice

How does a solenoid valve work?

The media controlled by the solenoid valve enters the valve through the inlet port (Part 2 in the illustration above). The media must flow through the orifice (9) before continuing into the outlet port (3). The orifice is closed and opened by the plunger (7).
Valve pictured above is a normally-closed solenoid valve. Normally-closed valves use a spring (8) which presses the plunger tip against the opening of the orifice. The sealing material at the tip of the plunger keeps the media from entering the orifice, until the plunger is lifted up by an electromagnetic field created by the coil.