That depends. If your piano has a USB connection, you can plug directly into the PC. USB cables are very cheap. If it has only a MIDI connection, you'll need a MIDI-to-USB adapter ... $40 to $50.
You might need a new soundcard, or you might not. The internal sound card quality might be adequate. But it might introduce latency ... a short delay between the time you press a key on the piano and the time you hear the sound. The freeware ASIO4All will often fix this problem, but not always.
In the latter case, you'd need a replacement sound card. For a desktop computer you could use a plug-in card. For a laptop you'd use an external sound card.
Most of these sound cards also have a MIDI connection. So if your piano has only a MIDI connection, the sound card can serve as your MIDI converter ... saving you from buying the MIDI-to-USB adapter. You'd only need a plain MIDI cable ... perhaps $15 retail, or even less online.
Here's the simplest case ... making a USB connection to the PC, and using the PC soundcard:

Here is a more complex view, showing several alternative ways:
USB connection to the PC
vs.
MIDI-to-USB connection using an adapter
vs.
MIDI connection using an external sound
