There are many kinds of solenoid valves, and different solenoid valves play different roles in the control system. The most commonly used solenoid valves are one-way valve, safety valve, directional control valve, speed control valve, etc..
Solenoid valve has a closed cavity, opened in different locations through-hole, and each hole is connected to different tubing, the middle of the cavity is a piston, on both sides of the valve is the two electromagnets, if one side of the magnet coil is charged, body will be attracted to the side, by controlling the body's movement to open or close different drain hole.
The inlet hole is normally open, and the hydraulic oil will enter different oil pipes, and then through the oil pressure to promote the cylinder piston, the piston drives the piston rod, and the piston rod drives the mechanical device. This controls the mechanical movement by controlling the current flow through the electromagnet.