The Piper version of Minecraft starts when you boot the Pi. If you go to the main Menu, at the top right you should see a button (red circle with a line thru it). If you push it you will get the option to exit to the desktop, reboot or shutdown the Pi.
If you perviously exited Piper and from the Raspberry menu, went to games and ran 'Minecraft Pi', you need a USB keyboard attached to the Pi to move. To exit, hit teh ESC key and press teh close box on the window.