One way to think of an Ostinato is as a "rhythmic" Pedal Tone. A Pedal Tone, (as Edward has pointed out, previously), is named for the "pedals" on Pipe Organ - these pedals are played with the feet of the Organist and are used to play the lowest notes of the Organ. A Pedal Tone is usually a single, held low note, over which the harmony/chords occur.
In a jazz setting, this device is explored with the addition of a rhythmic component added to the "Pedal Tone". This is usually used to create a harmonic and rhythmic "tension", which at some point is "released"- the bassist usually then chooses notes/rhythms more in line with the harmony and feel- ( see bars 9-16 and 25-etc). A thorough knowledge of the harmony will ensure that your "Pedals/Ostinatos" will make sense to the piano/guitar.
It is also common to have an arrangement of a tune that utilizes a preconceived Ostinato - A great example is Miles Davis 1958 version of "On Green Dolphin Street", (below), where the arrangement is an Ostinato on Eb for the first 8 bars of the form, (the first A section), and on the second A of the form, as well- ( bars 17-24).
(Here is the harmony that occurs both times over the Eb Pedal/Ostinato : Ebmaj7 / Ebmin7 / Fmaj / Emaj / Ebmaj7
Here is "The Cure", by Keith Jarrett - an Ostinato-based composition. (BTW - This doesn't "release" in the typical way that "On Green Dolphin Street" does). http://www.youtube.com/watch?v=fZAvftP9xNg
Thanks for your time and interest.