A pentatonic melody is one that uses the five-note pentatonic scale. In major, the pentatonic scale includes scale notes 1, 2, 3, 5, and 6. In C major, those notes are C, D, E, G, A. Notice that there's no F or B in a C pentatonic melody.
Pentatonic minor includes notes 1, 3, 4, 5, and 7. In A minor, those notes are A, C, D, E, G. Aren't those the same notes as C major pentatonic? Indeed they are; the difference lies in whether C or A serves as the tonic (the keynote).
One interesting thing about the pentatonic scale is that it doesn't include any half-step intervals. Half-step intervals are central to musical expressions of personal emotion. Without them, pentatonic melodies have a somewhat detached, universal feel. They're great for a big crowd of people singing together.
And the second interesting thing about the pentatonic scale is that, with one narrow exception, you can use whatever chords you want and it doesn't sound wrong. You can use any of your key's six major and minor chords in combination with any series of notes from the pentatonic scale.
The one exception is that the melody can't sit on the 1 note while playing a [three]m or [five] chord. In C major, you can't stay on the C note in the melody while playing an Em or G chord. The C clashes uncomfortably with the B in those chords. But as long as your melody keeps moving around, you won't run into that problem.
Morrissey, lead singer of The Smiths, and many others in the post-new wave/modern rock world use this trick to craft melodies that show an utter disregard for the accompanying chord line. Perhaps it expresses a personal stubbornness, a defiance of authority and convention. But you can't argue with the musical results, which are often quite powerful.
Give this a try: write a pentatonic melody, and then use some random technique for picking chords from the key's six chords. Then try a different random set of chords. You'll see that the melody fits in with both different chord lines.