Extractor serves to pull the cartridge (or cartridge case) from the chamber (OK, there's also a controlled feeding thingy in the loading process)
As the bolt is pulled rearward, the extractor continues to pull the cartridge back until the base of the cartridge strikes the ejector.
The ejector is...