Ostinato is different than melodic or harmonic sequence.
Both involve repetition of material but in different ways. Ostinato would repeat a bass as the entirety of the formal theme. - not just a melodic segment, but all the harmonic material. Also the repeats do not shift the music around harmonically. It's the same harmony over and over. It's a form of theme and variation.
Sequence take a short segment of music and repeats it with some kind of harmonic transposing.
How are melodic sequences used?
As the linked wiki article explains there are many kinds of sequence. But it may be helpful to know that the commonest appearance of sequence in the common practice era will display both harmonic and melodic sequence...
Notice in that example from Bach (taken from the wiki article) the material is sequence both harmonically and melodically. I would say this is the typical way it is handled.
The fact is, when you sequence a passage by shifting it up or down by step, it simultaneously is a harmonic sequence. Harmonic and melodic sequence devices can be used independently, but it is very common to see then used simultaneous as just two sides of the same coin.