What is the crankshaft sensor?

A crankshaft sensor senses the engine revolutions to basically tells the the car when 2 inject and ignite the fuel