Wow, lots of bad answers!
If you did not drive it/run the engine you will have to just drain the fuel tank and I would recommend changing the fuel filter. If you drove it you already know you have bigger problems- a complete fuel system drain and flush is the minimum required including changing filters.
Petrol (gasoline) has no lubrication properties so the fuel pump and injector pump wears fast, very quickly to the point of damage. It also burns at a much lower temperature so it detonates in the cylinders which will (if the engine will run) cause major damage quite quickly- you'll know something is wrong because there will be no power, lots of detonation noise, if the engine runs at all it will be very very rough, etc.
If it is an older engine it can tolerate a very small percentage of petrol mixed in , 5% or less, but an engine less than 20 years old cannot.
everyone new to a diesel has pumped in the wrong thing once- especially when the station has the wrong color on the pump (diesel is supposed to be yellow or green.)
Very few however blame their "love" for their own failure to pay attention.