When practicing a piece, it is a good idea to divide it into small segments. Just remember to always have those small segments overlap. When you practice a small segment, end with the beginning of the next one and start with the ending of the previous one. It is important to preserve the continuity of the whole piece in your head; to never lose track of how the little fragment you are playing fits into the rest of the whole puzzle.
When learning a whole recital programme or a piece with several movements, it is also a good idea to practice the first few bars of whatever comes next whenever you come to the end of a piece. It is a terrible experience to suddenly be stumped about how the next movement starts!