Select the music notation software that best suits your needs. There are many options available, either on the Internet to download or to purchase at a store.
Launch the software you chose and click on "New Project" or "New," in general.
Use the help source that will guide you as you go through the steps if you want, just in case you are completely lost. You can go that route, or you can simply start from scratch.
Establish the type of piano notes you want to write and then go through and place them using the software. You can use any kind of note (dotted half note, eighth note) you want, and if you like, you can preview your progress periodically by pressing the "Play" button.
Remember to "Save" early and often just in case the program or computer crashes.
Saving the file will also make it available to print. Once you have composed your song or melody, you can print it and test it out with your piano or keyboard.