Answer:
In theory, any vehicle or static plant that uses a gasoline (petrol) engine could use a diesel (i.e. compression-ignition) engine instead.
Compared to petrol engines, diesels have a much higher compression ratio of around 20:1, rather than around 10:1. Diesels are heavier, lower revving, more efficient, and cooler running. Diesel engines are never throttled; so they always benefit from turbocharging. A diesel engine will typically consume only two-thirds (or less) fuel than does a petrol engine.These differing qualities affect the the choice of engine type.
Motorcycles: these need light, powerful, high revving motors; so petrol engines are the natural choice. (There have been some petrol Wankel engines in bikes). At least one diesel bike has been built for military use; but it is inevitably heavy and slow, which defeats the object for most users.
Cars can use either type. In Europe, where fuel is expensive, diesel cars are very popular; whereas in Iran and the USA, where fuel is very cheap, petrol cars are still the norm.
Lorries (truck) need large engines of four litres or more capacity; and to use a petrol engine would be prohibitive in fuel consumption.
Military; Many British Army vehicles (including tanks) used to use petrol engines; but now almost all military vehicles, except motorbikes (but see above) use diesel engine. Petrol is more inflammable and thus more dangerous is a army vehicle is hit by enemy fire; and, generally, diesel fuel is more readily available in war zones. Diesel gets viscous and waxy at very low temperatures; so fuel heaters will be needed before the engine can start. Once running, the fuel can be warmed using a heat-exchanger.
Aircraft: Military and civilian jet and turboprop aircraft use aviation kerosene (paraffin) fuel; but most light aircraft use petrol engines. However, in Europe there are three firms (2 in the UK) making small turbocharged diesel aviation engines. The weight disadvantage is offset by a lighter fuel load; and aviation diesel (AVTUR) is less than a third of the price of AVGAS (aviation low-lead petrol). However, AVTUR does not have the lubricating qualities that road diesel fuel (DERV); and this issue must be factored into the design of an aviation diesel.
Ships: Ships use huge very-long-stroke diesel engines that turn very slowly and which are very very efficient. They burn a very low-grade fuel that is very viscous and is rather like tar. They must be started using DERV, and then the marine fuel is heated until it is runny enough to be used.
(Not that the QE2 used to have turbine engines. These were reliable and smooth, but very thirsty. The ship was re-engined with diesel generators that drove electric motors to power the vessel).