Before diesel cars gained popularity and became widely used it was commonplace for the diesel fuel pumps to be located separately from the petrol pumps at the fuel station. This would allow trucks to easily pull up and refuel. Nowadays with far more diesel cars on the roads the diesel pumps are commonly located alongside the petrol pumps.
This has resulted in it becoming surprisingly common occurrence to put the wrong fuel in your car. Having the pumps right next to each other, in combination with not paying specific attention has increased the chances of motorists putting the wrong fuel in their cars.
The level of damage that can be caused by putting the wrong fuel in your car varies greatly however putting petrol in a diesel car could potentially cause the costliest damage. Ideally you should realize your mistake before starting your car up after pumping in the wrong fuel. In this case, it would simply need the wrong fuel pumped out. If however if you have started your car and ran it for a few minutes the likelihood of causing internal damage to the engine is high and the wrong fuel would need to be drained as well as the fuel lines and filter flushed.
The best way to avoid putting the wrong fuel in your car is to take your time and pay specific attention when at the fuel pump and make sure you select the correct fuel. If you are confused or have any doubts at all just ask the fuel station attendant for clarification first.