Wikipedia pretty well sums up the history and functioning of the Schrader valve, as cmaster has noted in a comment. (As a bit of self defense, I independently chose Wikipedia as a good source after noting your question within the "newest" queue didn't yet have an answer). At any rate, the following information has been gleaned from that Wiki article and it's links:
Schrader valve components (from left to right) the valve core closed (top) and open (bottom), the order of assembly, end view of stem without core and with core (top) and stem with dust cap on (bottom). The core has a short outer thread which is screwed into the inner thread of the stem. The visible outer thread of the stem holds the dust cap.
The Schrader consists of a valve stem within which is the core. The core is a type of "Poppet valve" (AKA: mushroom valve) assisted by a spring. A poppet valve is a device used to control the opening, closing and the quantity of gas or vapor that flows into an internal combustion engine. They are used to control the admission and rejection of the intake and exhaust gases to the cylinders. The basic anatomy of it is a round opening or hole and a corresponding plug also oval or round that is connected by a valve stem. "The working end of this plug, the valve face, is typically ground at a 45° bevel to seal against a corresponding valve seat ground into the rim of the chamber being sealed. The shaft travels through a valve guide to maintain its alignment." (1)
With a Schrader valve, you have an externally threaded hollow cylindrical metal tube, typically of nickel plated brass. In the center of the exterior end is a metal pin pointing along the axis of the valve stem; the pin's end is approximately flush with the end of the valve body. A small rubber seal is located on the threads of the core to prevent gas or fluids from leaking through the threads. With this configuration, the flow of air is controlled through the valve by the spring holding the valve shut unless the pin is depressed, opening the tract to air flow. Air flows from the higher pressure gradient to the lower. Thus, when inflating a tire the pump creates a higher pressure than is within the tube or tire and air and additional air pressure is introduced. Depressing the pin to allow the opening of the valve without the seal or introducing air pressure of a pump causes the flow of air to escape the higher pressure of the tire into the lower pressure of the atmosphere.
The valve cap is important on a Schrader valve to prevent dirt or other contaminants from affecting the sealing surfaces and causing a leak.
(1) from the Wikipedia article on Poppet valve, https://en.m.wikipedia.org/wiki/Poppet_valve