I just replaced my crankshaft position sensor on my 97 Explorer 5.0. The sensor is right in the front by the water pump and the fan. The best way, well what I found out the hard way, to replace is to take of the belt. It gets in the way a little bit. The bolts are 8mm (I found that 5/16 fits more snuggly and that is what i used in the end.
The problem i ran into is my 8mm socket was cracked and i didn't know this until i was trying to get that dang bottom bolt out and ended up stripping it! Don't strip it (obviously) it is a pain in the arse!! by far the worst!
so easiest way, remove the 2 bolts (top and bottom) easiest way you can; crawling under, laying on the engine, ect.. then just unplug it. it came right out for me, well after the back-breaker of removing my stripped bolt.
then plug the new one in. My explorer started right up after that!, well i had to reset via taking off the battery terminals and waiting 10 seconds
PS i also, while turning the key over, i didn't initially "start" the vehicle, i waited until i hear the fuel pump actually pump fuel, then turned off. I repeated that 3 times so i had plenty of fuel in there then she cranked right over..
I should say that my initial problem and why i had to replace the sensor is because one morning she just decided not to start... go figure it happened to be the day i needed her the most haha!! i narrowed it down to the crankshaft position sensor then replaced.