If you do something ostentatiously, you're doing it in a showy, flashy way: you're making a big to-do.
Do you know people who are loud, over-the-top, and always walking into a room like they're a big deal? Well, they're acting ostentatiously and being ostentatious. That kind of behavior is usually considered obnoxious and pretentious, unless you're a king who has to wear gilded robes or a rock star who has to, well, behave like a rock star. Acting ostentatiously onstage might be necessary. But offstage, they're probably just attention hogs.