Two options. Open the map in the corner of the screen and use it to plot a route out, or simply retrace your steps and leave the way you came in.