In addition to b_o_leary's wu above, if you do not wish to include a button in your page, but instead just a normal link, you can do it like this:

<a href="javascript:history.back()">Go back</a>

Update: As a response to what WWWWolf said on his update above, it is not always necessary for the author of the HTML page to know where the user came from; these gimmicks are often useful because the user her/himself most likely does know where s/he came from (and if s/he wants to go back there or not).