Press F5 to refresh the page. That drops you out of the activity and returns you to the main area.
Be aware that refreshing mid-quiz usually discards whatever progress you had made in that attempt, so only use it if you actually want out.
If you are stuck rather than finished, look for an exit or close button within the activity first, since some quiz types let you leave and resume later.