The crankshaft position sensor helps the engine to keep running smoothly. It also measures the position and the rotational speed of the sensor to estimate the exact time for fuel delivery. Location of this sensor varies from vehicle to vehicle. Check the slides here to know how it works and the different types of crank sensors.