Modern digital keyboards come very close to standard pianos. Mind you, they can't replicate the sound perfectly. Just the way you finger the keys can make a difference.
You won't be able to play "Sonatas and Interludes" on it. OTOH the sound produced for 4'33" should sound exactly the same.
Digital makes up for it though, you can make sounds that you cannot make sounds that you cannot make on a piano. Some sounds for example trumpets, flutes steel drums, chimes, guitar, harp etc...