Practising is an Art in itself
It has to be learned, just as knowing where the notes are on the guitar has to be learned.
The first and most important aspect is to practice SLOWY and in time, even if the result doesn't 'sound like the music'.
"But it doesn't sound like it," students often say.
That's because the rhythmic sense of the music is lost at very slow tempos but if you practise too fast, you will not be able to make the transitions and create the flow necessary to make the music 'sound right'.
Practising too fast is the most fundamental mistake people make and is usually due to impatience.
It's also often due to completely ignoring the timing and placing the emphasis on what people call "the tune".
It is necessary to sometimes separate the sound of the melody from the rhythm.
Time, rhythm and phrasing are the most important aspects of music and the most difficult to master for most people.
Get a good professional teacher and they will show you how to practise properly and save you a lot of time.
Invest in a metronome.
Learn to count rhythms by developing a counting method for one-beat notes, then half-beat notes, then quarter-beat notes and then triplets. There's obviously more to it than those examples but you have to start somewhere.
ALWAYS PRACTICE IN TIME! That is what music *is*