I want to play with my friend but don't know how!
What you are referring to is called "Cross Platform Multiplayer" Where two or more players on different consoles can play the same game. Currently, Cross platform multiplayer is very rare, and few games have this feature available.
There have been rumors that improved Cross platform multiplayer may be included at a future date on some or all of the minecraft versions, but this is not yet confirmed.(http://www.ign.com/articles/2015/08/05/gamescom-2015-mojang-wants-minecraft-to-work-cross-platform)
Unfortunatly, at the moment, You can only play Minecraft online multiplayer if you, and everyone you are trying to play with are using the same version of minecraft on the same console or platform.
*EDIT As Pointed out by colorfusion in the comments, Minecraft Pocket Edition is compatible with Minecraft Windows 10 Edition. (Here's an article about it http://www.pcworld.com/article/2982932/software-games/minecraft-pocket-edition-now-lets-windows-10-ios-and-android-gamers-play-together.html)