This is possible as long as you have not quit the realm. First, click on the Wrench near on the right of your realm in the realm menu. Next, Click world backup and hit "Download latest." Once you do this, a percentage bar will come up and once you hit 100% you will be able to play the world in singleplayer survival.
To email your friend the world, type %Appdata% on a windows computer (in the start menu) and press enter. From here, you go to .minecraft/saves and find the world. This should be saved as a folder. Right click on it and select 'Send to > zipped foler'. Once you get the zipped folder you can email it to him, and he will be able to download the zip and extract it to his %appdata%.minecraft\saves folder