Download the server software for the version you want to play. Then just run it. You would then connect to it via using either 127.0.0.1 or "localhost". Anyone else within your home can connect via using your computer's local IP address, as found by typing in "ipconfig" in a command prompt. (ifconfig if using linux). If you want to allow people from outside your home to connect, you will need to learn how to port forward on your router to open up the appropriate port, which is IIRC 25565 by default.