The State Rooms at Buckingham Palace have been opened to the public for the Annual Summer opening, in August and September, since 1993, after the fire at Windsor Castle in November 1992. Initially the Summer Opening was considered a way to pay for the damage at Windsor Castle, but it became so popular that The Queen has continued to allow visitors every summer. The Queen is not at Buckingham Palace when it is open to the public--she goes to one of her country residences.
If you are visiting at a different time of the year, go along to see the Changing of the Guard. It happens on scheduled days ,so check before setting off and arrive early to get a good position to watch the action!