There’s a great function called wp_redirect(), unfortunately not supporting “last page” argument yet, but I hope it will soon.
I believe the easiest (but not the most elegant way) way to achieve what you need is by using JavaScript, in jQuery it will look like:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#back-link').click(function() {
history.go(-1)
});
});
</script>
<a href="#" id="back-link">Go back</a>
It won’t refresh the last page though, but in my opinion it’s even better.
Hope it helps.