One option is to walk back out through the instance portals, or
to use your hearthstone. If you have used the LFG system to enter a
dungeon, there will be a green orb at the bottom left of your
minimap. Right-click it and you will see an option to exit the
dungeon.