Japan has had four capitals in its history: Nara, Kamakura, Kyoto, and Tokyo (東京, Tōkyō).
Kyoto was the capital from 794 to 1868 (except for 1180), the Kyoto Imperial Palace served as the residence of the Imperial Family (皇室, Kōshitsu). The current palace sits in Kyōto-gyoen (京都御苑), a large rectangular estate that spans 1.3km by 700m, and was once a walled cluster of the palace together with the residence of court nobles in the area. After the shifting of the capital, the residence of court nobles were demolished and the area was converted into a public park.
The palace grounds can be visited free-and-easy (previously it was only via prior reservation on a guided tour), or via a 50 minute guided tour that takes place twice a day at 10am and 2pm. It should be noted that you can’t actually enter any of the palace buildings themselves, and you can only view them from a distance.