If you would like to decode Morse code with an existing program:
My personal recommendation is Fldigi, which is a software modem that runs on most major operating systems, including Windows and Linux. Fldigi has a modem for "CW" (Continuous Wave), which can both send and receive Morse code. The program uses your sound card to communicate with your radio. To receive and decode Morse code, you would connect your receiver's audio output to your computer's microphone port. Then Fldigi will be able to listen to the Morse code sounds and can decode the transmission for you.
If you would like to write your own program to decode Morse code:
You will need to read about some digital signal processing techniques to do this. Ultimately there are a few different ways to approach the problem. Let's assume you already have some way of getting audio from your receiver into your computer (maybe you have pre-recorded some transmission and saved it to disk, or maybe you are doing this in real time by reading sound input data).
Your first goal is to implement some kind of algorithm to detect the presence or absence of the carrier frequency (which is being turned off and on in order to send Morse code). You should learn about something called the Discrete Fourier Transform (DFT); this online textbook is a lot of material, but if you are interested in digital signal processing and working with radio or audio signals on your computer, you will get a lot out of it.
A simple explanation of the DFT is that it takes a sequence of audio samples and tells you the amplitude (and phase) of certain frequencies of your signal. For your application, you can calculate the DFT over your sample buffer and then look for the output value that corresponds to the frequency of the Morse code tone. If the value corresponds to a large amplitude then you know the carrier frequency was present in your sample. If the value you see corresponds to a small amplitude then the carrier was not present. This will allow you to detect the Morse code sound.
A simpler way to do this is the Goertzel algorithm. The Goertzel algorithm is essentially a single tone detector. It calculates only one frequency component of the DFT. If you know ahead of time what the audio frequency of your Morse code tone will be, you can implement a Goertzel filter that will detect the presence or absence of that tone (as illustrated in this white paper). However this is a more advanced way to do it, although it is more efficient.
Once you have detected the presence or absence of the Morse code sound, you will need an algorithm to figure out whether a dot or a dash is being sent. One algorithm to do this is that used by the RSCW program. The disadvantage of this algorithm is that it does not tolerate poorly sent code. It will do well when detecting Morse code that is sent by a machine, but humans cannot send with perfect timing and so this algorithm may not do well. However it is a place to start and maybe you will think of some ways to improve it, or come up with something yourself depending on the results you get from the carrier detection step.
Writing a Morse decoder from scratch is challenging, especially if you have never done digital signal processing before. However it is a rewarding experience and will teach you a lot about DSP and integrating software with radio. If you have some programming experience, you should not have any trouble finding libraries for audio input and DFT in your favourite language.