We've all seen those movies where someone lights a match by striking it against the window, or their boot, but if you've tried this yourself, it probably didn't work. That's because most matches today are safety matches. They're made in such as way that they can usually only be ignited when struck on the lighting strip of the match box or book. The flame is caused by the combination of an oxidizer (usually potassium chlorate, which is in the match head) with a reducer (usually red phosphate, found on the lighting strip) and the heat of friction caused by striking the match on the box. The matches are safe because the chemicals are kept separate until the match is struck.
The matches in those movies, however, are strike-anywhere matches or Lucifers. In these, all the chemicals are found in the match head. All that's needed to light the match is friction: The match can be struck on almost any surface -- even your pant leg! Historically, strike-anywhere matches came first, and they made lighting fires (and pipes and cigarettes) a much simpler job. However, the matches were also a safety hazard, as they could all too easily light unintentionally. Since the invention of the safety match in the mid 1800s, strike-anywhere matches have become far less common.
Nonetheless, there are plenty of anecdotes about being able to light a safety match without the box. This can only occur if the friction can make enough heat to start the chemicals in the match head burning even without the red phosphorus of the matchbox strip. If this is going to work at all, sandpaper makes a particularly good striking surface because the gritty surface provides lots of friction; other surfaces might work too, such as the unglazed ring on the underside of a mug. Even then, the force needed to get enough friction is likely to break the match. The best and safest way to light a safety match is the way it's intended -- with the box.