How to Make a Minecraft Multiplayer Server? PC (1.7.10)?

One of that main reasons I wanted to get minecraft is the play multiplayer survival with my friend, and maybe some modded servers. When I look it up, it says to click the open to LAN button, which I did, and I get a short server ID, (EX: 59561) and it says game hosted on that port. And when my friend types it in on the multiplayer server thing, he said it didn't work. And Vice Versa. When I looked it up on youtube, I saw they had a longer server ID. (PS: I didn't download minecraft from computer, I bought the card and typed in a code)

When you open it to LAN, only people on your network can play (Using your internet) and it would come up automatically without having to enter anything. To get an actual server you either have to make it your self (Google tutorials), buy one off a website (MCProHosting is an example), or buy a realm from Mojang that is $13 a month.