Houses, or some of them anyway, inside the tower are occupied by the Yeoman Warders (Beefeaters) and their families. The Warders are all former servicemen (and women) with at least 22 years service. The origins of the Warders go back to the reign of Edward IV, and they have been part the Royal Bodyguard since the 1500's
Because the tower is still officially a royal palace, a guard is maintained there (it's a unit of the Queens Guard). Guards are posted outside the Jewel House (I think you can guess what is kept there) and the Queen's House, and it was probably the one at the Queen's House that you saw.