The diesel/petrol confusion is primarily because otto cycle engines typically run with air and fuel pre-mixed before the compression stroke, while diesel engines have the compression stroke take place with air only and then introduce fuel near TDC.
When an otto cycle starts the compression stroke, the fuel/air is progressively (and quickly) compressed, raising it's temperature.
A fuel with a low octane can ignite on it's own, just due to the temperature created during compression. Higher octane fuel will survive this, allowing combustion to start when the sparkplug dictates.
Hot-spots, due to carbon, or glowing artifacts like carbon or a too hot spark plug electrode can start pre-ignition, or the commencement of burning before the scheduled spark (run on is a bit of this also). Octane may or may not help this.
"detonation", or end gas auto ignition occurs when the flame starts to increase the pressure in the chamber, to the point that at a remote part of the chamber, the gas autoignites and you end up with an opposing flame front heading back at the original front. This is typically signified by pinging or knocking.
Better engine design (shorter flame path, heron heads etc), better cooling, more revs (ever heard engines knocking away from traffic lights) lower chamber deposits, or higher octane help alleviate this.
If you want, chick a litre of gear oil in a half tank of fuel, and you can see this for yourself.
Diesels have another set of problems.
The fuel is injected into a high pressure, high temperature environment.
The fuel has firstly to start mixing with the air, to get into the combustible range. When a combustible mixture is reached, it has to ignite by itself.
If the fuel has too low a cetane value (opposite of Octane) a whole load of it evaporates before it finally fires, leading to nasty knock. Can be fixed by improved chamber turbulence, purposeful hot spots, better cetane (lower octane) fuel, improved atomisation (some modern diesels have a dozen separate injection events in a single cycle to control the evaporation and combustion of fuel.
So diesel ignites easier, and petrol harder...In their own operating environments.
As to the original topic, there should be little damage, as long as you don't run with rampant detonation. Preferably drain the tank, otherwise top up with premium as soon as you can.