To be able to record your riffs, you need to know how to record them. First thing to do is recording set up and after that you’re ready for some audio recording.
You can use the built-in (first aid) sound recorder, but it is far better to use a little more advanced open source music editing and recording software like Audacity, which is very easy to use and it’s free. Another audio recorder is Kristal audio engine, which allows you to do multi-track recording and it’s freeware to. With both of this software you can make demo records of your songs, easy and fast.
But, if you need more tracks to record, or you want to make more serious recording, then you should consider to get some professional music production software like Cubase, which is not free, but it is great. Also, it is very useful to get familiar with this music production software, because of its use in the studios.
So, choose proper program depending on your needs.