Sounds odd, doesn't it: Practice makes perfect. But it's true! In our world of music, the original saying is backwards.
One thing I like to explain to my students when we first begin our journey together is that your brain is smart: you can look at a piece of music that is your level (and sometimes even more complicated than you are playing) and understand most of what is there and how it should be executed.
So yes, your brain is smart, but your hands are stupid! This usually elicits a laugh (or a complaint that I used the word stupid). But what it boils down to is that a major part of our job, especially when we first begin to learn a new piece, is to train our hands to do what our brain can do easily. We need to strengthen that connection between the brain and the hands.
So we try and try and try, and we get it right! We celebrate! But is once enough?
Just getting it right once isn't enough. We've got to reinforce that connection, because let's face it, we've still played it many times more incorrectly than we've played it correctly. So, let's get it several times perfectly in a row.
When can we move on?
We should ask ourselves this: when I come back to this the next time I practice (hopefully tomorrow), will I be able to execute this phrase, this passage, these notes correctly right away? If the answer is no or maybe, it needs more repetition! If you can honestly answer yes to this question, then you can move on.
What if I work for ages and still can't get it, or it gets worse? There are several options here:
Sometimes it takes a few days to get something. Make note of the progress you did make on it and come back tomorrow.
Perhaps there is something you're doing technically that is making things worse - pay attention to the shape of your hands, how they depress the key, how they stop the string (are they squeezing?), how they draw the sound. Here is where I (or your teacher) can help if you can't figure it out on your own. It is always OK to call me for help!
If you're getting frustrated, it will likely get worse before it gets better. Save your sanity when this happens and start fresh the next day.
So it really is true that Practice makes perfect! You have to get it right, then practice keeping it right!