Get a musical score of "The Entertainer." You can buy one at your local music store, order one online or download it for free at the International Music Score Library Project website.
Analyze the score before you sit down to the piano, using a recording if necessary. You'll see that "The Entertainer" is built on an A-B-A-C-D structure. Each letter corresponds to a different section of music. There is also a modulation to F major in the C section. Remember this as you practice.
Practice each section individually. Start by familiarizing yourself with the left hand. Pay attention to the changes in harmony, and practice doing the leaps from the bass notes to the chords without looking.
Practice the melody, or the right hand, of each section. You might want to do some octave exercises before you start. If you have trouble playing the octaves in the melody, leave out the lower notes. Play the right hand melody of each section with a metronome so you get a feel for the syncopation.
Write in fingering for every difficult section, and stick to that fingering always.
Begin to put the two hands together. Remember, you're still practicing one section at a time. Play very slowly, about half as fast as you were playing the individual hands. This will help your left hand to execute the jumps accurately, and it will help your right hand play the rhythms correctly.
Increase the tempo gradually. Practice with a metronome so you don't rush. By now, you should have some parts of the piece committed to memory, so you're not buried in the music.
Practice the transitions between sections. Start four measures before the end of the second repeat of section A, then play straight through the first four measures of section B. Do this for all the sections.
Put it all together. Play the whole piece through from beginning to end, a little below performance tempo. Record yourself to see how it sounds, then go back and work on any sections that need to be improved. Soon, you'll be playing for your friends.