Seems obvious but there is more. Playing the piano is actually more like an athletic event than most people realize. Very similar to ballet in fact in terms of the graceful motions of your arms and fingers and the amount of control you have over your movements. Similar to tennis also in that way. Almost any athletic event involves repetition of movement to achieve a desired result. This repetition is what produces a "physical" memory. A "physical" memory is what I call the appearance that your body remembers the movements you make and you are able to move that way without thinking about it. Much like tieing your shoes... your hands know how to move without thinking about it.
That is what part of practicing is about. This is the way it happens:
You learn to play a passage in a piece of music, this takes several repetitions at a slow tempo, gradually trying to increase the speed. After a while, you are able to play it if you focus your attention on the problems. The next time you come back to it, you can't play it. Even if you have just payed attention to something else for a little while, the passage still needs more repetition.
So not only do you need to repeat the passages of music you want to learn, you have to repeat the repetition!
Typically the amount of repetition is less the next time. But you can count on the need for repetition again.
What I have described is only the beginning however. This is just the mechanics of pushing down the piano keys. The musicality is next and the goal here is to be paying attention to the sounds you hear rather than the keys you press down. Your "physical" memory comes in very handy here. (It's also a dangerous thing because relying only on "physical" memory is suceptable to failure, but that is another topic)
Even though you can't turn your ears off, it's very possible to not really hear what you are playing. Similar to the way we don't hear the background music in the grocery when we are concentrating on shopping. Part of music lessons is learning this skill of listening even though your attention naturally falls on other things.
One other note... you can't cram. All of this takes time not only to practice but also to allow your work to assimilate into your mind. 8 hours of practice in one day does not equal one hour of practice for 8 days. Slow and steady is the pace to set for yourself.