There are 47 prefectures in Japan and Tokyo is considered as one of the 47 prefectures. Therefore, Tokyo is a prefecture rather than a city.
Tokyo Prefecture comprises of 23 wards, some cities such as Fuchu City, Musashino City, Mitaka City and also some remote islands in the Pacific, Bonin Islands located 1,000 kilo meters south of central Tokyo. These remote islands are also parts of Tokyo Prefecture.
Many Japanese people are not aware that Tokyo is not actually a city. One main reason is because there was, in fact, Tokyo City in the past. Tokyo city did exist in the Eastern side of Tokyo from 1889 to 1943. The area is presently known as Tokyo 23 wards area.
・Although there are 23 wards in Tokyo Prefecture now, there was a time when there were 35 wards or 15 wards.
・Each ward of Tokyo has its mayor just like any other city does. Nowadays, each ward calls itself a city and the municipal office is called city office or city hall. If you visit a website of, for example, Chiyoda ward, one of the main wards in Tokyo where Tokyo Central Station and Imperial Palace are located, you will notice that it says “Chiyoda City” and if you go to the building of Taito ward’s municipal office, you will notice that it says on the wall “Taito City Hall”.
・Tokyo is hosting Olympic games (now changed from 2020 to 2012) and in this case Tokyo is regards as a de facto city. Tokyo Metropolitan Government is the organization that is hosting the Olympic Games.
To the question of “Is Tokyo a city or a prefecture (state)?, the right answer will be “It is not a city but a prefecture.”