Let's say you were about to learn the song 'Twinkle twinkle little Star' on the violin or piano (but I guess this technique should work for every instrument).
The technique we will use is fairly simple: Look at the note you want to play and say its name loud before you play it.
It's important that you first say the note out loud and THEN play.
Don't do it at the same time as the learning effect won't be as big. (Going slower sometimes is going faster.)
When you have played the first note, you will do the same with the second note and so on until you have finished the melody. Be aware to play really slowly (almost in a mechanical way) so that you can concentrate on each note when you play it.
The goal is to create an association between saying the note, the feeling of playing the note and hearing the note.
When you practice this technique a few times, you will be able to play from the notesheet after 1 or 2 days. After more time practicing this technique you will even have an idea how the song will sound like, because of the association you created that I mentioned earlier.