There are many reasons you would want to use a microphone to record on your computer. Maybe you record podcasts. I've summarized a few microphone options you could purchase that would be compatible with a computer. Many of these options come from an article on Lifehacker (Alan Henry, "How to Choose the Best Microphone for Your PC"), and I've provided the link to that article below.
If you have light needs on your computer, you could go with a webcam that has a built-in microphone. A good webcam with a built-in microphone is the Logitech HD Pro Webcam C920 ($100). It is on the upper end of the affordable microphones, but it will last longer than the very cheap microphones.
If you're a gamer, you may want a microphone that is better than the microphone on your computer. The V-Moda BoomPro microphone is cheap (only $30) and is clear and reliable.
If you're thinking about recording audio for a specific task, like a podcast, you may want to get the Blue Yeti. The Blue Yeti is a $100 microphone that is effective and easy to use.
You will also want to figure out what computer program is best with your microphone. If you're recording for a podcast, you will want to find a program that is specifically good for cutting and editing audio.