Well, which compiler/IDE are you using? There are a few differences that actually may affect all that. Also wouldn't hurt to know what OS you're running in. In general, most allow you to start a new project. After answering a few questions about type of application, name and other goodies, it opens the project for you. Then you need to type in the code (or CAREFULLY paste it). Then save the project and all of its files to the SAME directory/folder. Then you can usually get it by either compile, compile then link, build or make from some menu inside the IDE. These are very general directions only. Give me more to work from and I'll try to get closer to the actual instructions if I can.
/*What does not kill us, makes us drink far too much caffeine*/