To do something modestly is to do it in a humble way, without showing off. After her play's successful opening night, a playwright might choose to sit modestly in the audience rather than going on stage to bow.
When you act in an unpretentious way, you act modestly, and when you do something in the simplest way possible, you also do it modestly. The adjective modest can mean both "humble" and "small." Modesty and modest come from the Latin modestia, "sense of honor," or "correctness of conduct," from the root word modus, "measure or manner."