You can do about a million and one things from South Station in BOS, or Back Bay. Depending on how long your layover is, I would suggest getting off in Back Bay and heading up to Boylston Street or Newbury Street. Then walk East down either to head towards the Boston Public Garden and Boston Common. Walk through both, ride the swan boats, etc. You can then walk over to downtown crossing and over to the aquarium or Faneuil Hall/Quincy Market. Walk part of the Freedom Trail.
You can then walk over to South Station and board your train from there. Lots of options. How long would your layover be? You could do the walk between Back Bay & South Station quickly, without stopping, in probably about 30-40 minutes. If you have two hours to kill, it could be very leisurely and nice, depending on the weather, and a great way to see much of the city.