In the "Centro storico" (historic centre of the city), you can't miss the Palazzo Publico and it is well worth a tour of the museum inside. It's believed to have been the site of a palace since very shortly after the republic was founded but, not surprisingly, that building has been repaired on various occasions since then -- the most recent incarnation was begun in 1884 from designs by a Roman architect, Francesco Azzurri, and construction was overseen by master-builder, Reffi, a home-grown San Marino-ian, using stone quarried from the Titano caves by the local stone-cutters. Construction took 10 years and the inauguration took place on 30 September 1894.
The Palazzo stands on a square called Pianello or, these days, Piazza della Libertà. Beneath the square lies an antique system of cisterns connected together for the collection of rain water, once used as a water reserve for the city's citizens. In front of the palace stands the former postal building, now reconstructed in a 1500s-style on the foundations of the Parva Domus of the commune of the 1400s.
The creamy-yellow stone has mellowed into a beautiful facade, particularly at sunset, and is richly decorated with the coat-of-arms of the Republic's castle, held up by three arches. (Cue photo below). There's also the impressive clocktower which can act as a useful reference point when you're trying to find your way back to the square. As well as being a museum and the formal centre of government and administration (you can peer into the council chamber on the second floor), it also hosts a formal guard of honour (in uniformed regalia) which changes twice a day. They are not the most organised band but they take it seriously and it's worth hanging around to witness them doing their best.
It's also worth venturing inside the palazzo to see both the gracious layout including, as you first go in, a great entrance hall with numerous shields and coats-of-arms on the walls, the exceptionally fine marble spiral staircase, some nice tapestries/wallhangings and paintings, a cracking Council Chamber with 60 imposing counsellors chairs (almost regal in style -- which is odd for a republic), the Congress and Hearing halls which lead into the Voting Room where the windows look out upon the square below and give a great view (sadly no photography allowed in these chambers). There are also some oddities worth looking out for -- busts of Lincoln and Napoleon, historic charters and treaties). On the sculpture front, look out on the mezzanine level for a bronze statue of San Marino himself, under the porch on the right for a marble bust of the architect, Azzurri.