The best way would be:
Get a high end computer.
Get a special sound card for recording an analog signal onto the conputer.
Get a good mic preamp or mixer.
Get a condenser studio microphone with good performances at all ranges of the piano
But that would be very expensive. The high end sound card will be at least $300, mic $200, preamp $100. The PC can be up to $2000. You want at least two hard drives, one with alot of room to store all your files and one with high speeds, big cache to record to. You also need software but you can download that for free but thats official illegal.
This way you place your mic somewhere(don't ask me where, I never recorded a piano), connect it with the preamp. The preamp amplifies the signal so it can go into the line in of the sound card and the line in has a AD-convertor so you can record it to your HD. You could connect the mic with the mic input on the sound card but then you would use a preamp in the soundcard, then go through the same AD converter and record it to HD. Its just that a preamp like that really distorts your perfect mic signal.
If you have something like this you can do alot. If you use several microphones and have a soundcard that can handle like ten of them(will cost you about $800 plus the individual mics) you can record a whole string section individually and have the recordings in seperate tracks on your PC so you can mix it anyway you want.
Your recording will be as bad as the weakest link. So you can do it with a standard sound card, normal mic, and using the bad mic preamp in the soundcard.
But the simplest would be to connect a keyboard or electric piano. I don't know how that works. But its also the cheapest, if you have one. The signal is already digital so you do not need to convert it.
There are still musicians that prefer analog recordings, even when its for a CD recording. But if you want to have mp3s on your PC and burn on CD then you should go digital.