Petrol and diesel fuels have different properties such combustibility, thickness, and the engines of cars are built to handle only one fuel type. So the damage that can occur to your car depends on if the car was petrol or diesel.
Diesel has to be compressed to ignite so usually, the outcome is that the car would not start at all, since the engine is effectively clogged up. Even if it does start there is a lot of smoke and loss of power.
The damage in putting petrol in a diesel car is more pronounced, as petrol has a higher combustibility, meaning that it will detonate faster, causing misfiring and can result in permanent damage to the engine.
First of all, do not start your engine. The further the wrong type of fuel goes into your engine the more damage it can potentially do. If you have already started driving, stop in a safe place and turn off the engine.
Next arrange for the fuel to be drained. It is best to involve professionals as the drainage needs to be quite thorough, including fuel lines as well as the fuel tank.