Octane is gasoline's resistance to preignition as rated on a scale. The higher the octane number the less likelyhood of preignition (spark knock).
Two methods of measuring octane are available: Research and Motor. The numbers do not correspond between them, but are close. The number on the fuel pump, 82/87/92/101 is an average of the two.
Generally, you should use the lowest octane number that allows you to operate your engine without knocking in the way you use it.