How can I play together with my friend in a Minecraft world using the Open to Lan button in the Escape menu?
PS: We don't play on the same network.
For this function you have to be in the same network.
Unless you're using a program like Hamachi.
Then it doesn't work unless you set up a VPN tunnel. You can find out that you have to be in the same network btw with a Google.
If you are not playing in the same network, you need a vanilla server and appropriate port sharing on the router.
Okay thank you thought that works without a server and such.
No, as the name open to lan suggests, it is only possible in the LAN (LocalAreaNetwork). So in the same network.
"LAN" means "Local Area Network" and that means "Local Area Network"; and if the other person is not "on site", then they are not in this network either.
So no, that is not possible.