If you accidentally put diesel in a petrol car, it is important to stop driving immediately and have the vehicle towed to a mechanic. The mechanic will need to drain the diesel from the fuel tank and fuel lines, and flush the fuel system. They may also need to replace the fuel filter and spark plugs.
If diesel fuel gets into the engine oil, it will also need to be drained and replaced. Driving a car with diesel in the oil can cause the engine to wear out prematurely.
Putting diesel in a petrol car is a costly mistake that can easily be avoided. Always make sure to check the fuel pump label or your car's owner's manual before refuelling.