The octane rating of gasoline tells you how much the fuel can be compressed before it spontaneously ignites. When gas ignites by compression rather than because of the spark from the spark plug, it causes knocking in the engine. Knocking can damage an engine, so it is not something you want to have happening. Lower-octane gas (like "regular" 87-octane gasoline) can handle the least amount of compression before igniting.