It sounds like its not getting fuel. Could be clogged fuel filter or bad fuel pump.
You may have overheated the engine or seized it.
when it wont start
Water in the in distributor cap. Replace it.
check the ignition module, it's in or around the rotor
carb. adjustment, fuel filter or the engine is shot.
Make sure connections are on tight.
If a new car engine was installed and a vehicle still will not start, it might be that the computer needs to be reset. If other engine parts were reused on the new motor, like the starter, that should be checked too. Also check the battery and ignition switch.
the engine wont start
Maybe Its The Muffler or the pistons hitting the engine
If the engine turns over the batteries are fine. Diesels require special equipment to troubleshoot, take it to a shop that is competent in diesel engines.
electronic control unit
Check engine compression Check engine timing