Did you google it? I've just googled
how to get out of fullscreen mode in minecraft-pi
and got some possibilities suggested. One suggested ...
F11 for Fullscreen
By default, F11 (Fn + F11 on some keyboards) toggles fullscreen mode.
If that doesn't help, pause the game (by pressing Esc) and go into
Options# # Controls# and check your keybinding for toggling fullscreen
mode (under the "Miscellaneous" section).
Alternatively, you can go into Options# # Video Settings# and click
"Fullscreen: ON" to turn it off manually.