There are several very good sounding virtual instruments available. Sound quality is often as good or maybe even better then of digital pianos. The only problem is that you usually also want the same feel as a real piano. Just connect a midi master keyboard via usb or midi and most virtual instruments provide a host application which allow you to start jamming. If you want additional sounds like drums, vocals, etc. then you need a good daw like reaper, cubase, ableton live, fruityloops, cantabile, etc. All of them can host vst's but have different work flow for recording, mastering, live editing or just live working with presets/patches. All have excellent audio quality.
What is playing better depends largely if you want excellent audio quality and/or piano feel. Good hardware is not cheap but lasts a very long period.
There is an additional thing and that is if you want good latency (the time between you hit a note and the computer generates the signal and outputs through the speakers) then that will require a good fast computer with a good audio interface. A digital piano has all this combined in one hardware unit but is less flexible.