1. The octane number.
2. The owners manual will tell you.
1a. Octane number is formally defined as a percentage proportion of iso-octane in normal heptane that produces the same knocking in a standardized test engine.
See RON in http://en.wikipedia.org/wiki/Octane_rating
2a. The engine will tell you if it needs higher octane fuel, by knocking and running like crap.
Do not allow an engine to knock for any amount of time. Reduce the load, shift down, retard the spark, or tow it until you can get some higher octane fuel into it.
1b. Octane number is sort of the opposite of Cetane number, which is used to rate Diesel fuel.
Diesel must ignite instantly when injected into a high temperature air chamber.
Under the same circumstance, petrol must _not_ ignite until a spark is applied.