A valve is an apparatus by which the flow of fluid or liquid materials is regulated by the valve being open, closed, or partially obstructed in a passageway.
In terms of engine mechanics, a valve is a mechanical device that regulates the passage of fuel into the cylinder of an internal combustion engine. More specifically, the valve controls both the inflow of fuel and air into a combustion chamber as well as the outflow of spent combustion gases from the combustion chamber.
Most modern engines use what is called a valve train. This valve train consists of valves and a mechanism that opens and closes the valves called a camshaft. Lobes on the camshaft move it up and down. An overhead camshaft in modern vehicles is a camshaft with valves located above it. The cams on the shaft activate the valves directly or through a short linkage. A timing belt also connects the crankshaft to the camshaft, allowing the valves to work in unison with the pistons inside the cylinder. There are typically four valves per cylinder in modern vehicles -- two for intake and two for exhaust.