Being able to make things up as we go along is a great skill to have in life, and it's equally important in playing piano. A great example of that happened at a Ray Charles concert in 1958 when Charles and his band had played all of their songs and still had time to spare - he improvised a song he called "What'd I say?", which some say was the first soul song. It became so popular that he ended all of his performances with it from then on.
Some piano players (like Ben Folds) make up whole songs by improvising, whereas others (like Nina Simone) might break up a song they know with an improvised instrumental section. While Ben Folds and Nina Simone make improvisation look effortless, anyone who has tried it knows just how much experience in piano playing you have to have to improvise like that.
This doesn't mean that beginner piano players can't improvise well - it's very easy to play beautiful improvised pieces if you set yourself some "rules" to follow. If you're just starting out, set more limiting rules, like "I'll use the same rhythm throughout the song, I'll use the same chord in my left hand, and I'll only use notes from that chord in my right hand". You'll get bored of that very quickly because there aren't a broad range of sounds you can make with those restrictions in place. Change it up by using the four chords from Raindrops (Gb, Ebm, Db, and Bbm) in one hand and playing a melody on the black notes in your other hand (like Tom). Before you know it you'll be ready to add more notes and keep expanding the range you can improvise with.