Most hand pumps used to inflate bike tires are reciprocating pumps. They have a piston inside and two one-way valves: one going to the bike tire and one to the outside air. When the pump is pulled up, the pressure inside decreases. This pulls in air from the outside but closes the valve to the bike tire. When the piston is pushed down again, it compresses the air inside. This closes the inlet valve and opens the valve to the tire, pushing air into the bike.
Diaphragm pumps are closely related to reciprocating pumps. Instead of pistons, however, they have flexible diaphragms. When an external force is applied, the diaphragms compress, forcing air into whatever it is being pumped into. When the force is removed, the springy diaphragm expands again, drawing more air in from outside. Foot-operated pumps used to inflate rubber rafts are diaphragm pumps.
Reciprocating pumps take a lot of motion to operate. To pump one cylinder full of gas, the user has to pull the plunger up and down. Double-acting pumps work more efficiently by using two or more cylinders. When the plunger is pushed down on a double-acting pump, it compresses one cylinder, pushing air out. At the same time, the other cylinder is pulled open, drawing in air from the outside. When the plunger is pulled back up, the open cylinder is compressed and the compressed cylinder is pulled up.