There are several ways of doing it. Your heading suggests that your computer is not working. So the most obvious answer is to remove the hard drive and mount it in another computer (usually as a slave or a secondary drive). Then save any files you have created to a CD or DVD.
Transferring an OS or installed programs from a faulty drive may result in problems, as per the post above.