First, decide whether it's worth leaving the city
If you have three or four full days and it's your first visit, Rio already offers plenty of beaches, views, neighborhoods and museums. With more time, pick a trip based on your interests and factor in getting there, the visit and the way back: travel time is part of the experience.
Niterói: a nearby city escape
The ferry crossing between Praça XV and Praça Arariboia lets you plan a day of museums, views and walks on the other side of the bay. Confirm routes, schedules and fares with Barcas Rio ↗ and check how you'll get from the pier to your specific destination.
Petrópolis: heritage and mountains
If you're interested in imperial history, plan a full day for Petrópolis. Check museum opening hours before buying your transportation: the trip and the visit take more time than an outing within Rio.
Arraial do Cabo, Búzios, Paraty and Ilha Grande
These are very appealing destinations but involve longer journeys. To enjoy them, compare a night away from Rio with a round-trip tour; check the actual duration, departure point, sea conditions and cancellations. Don't try to squeeze several distant beaches into a single afternoon. See the state tourism portal for Arraial do Cabo ↗.
Back to your plan
Before booking, check your trip calendar and the four-day city itinerary. The right choice depends on how many nights you have and how much time you want to spend traveling.