Like the others have said there are two types of Kingdom Hearts, but the original Kingdom Hearts is supposed to be a paradox "entity". The story of Kingdom Hearts is about the co-existence of light and darkness. There cannot be light without darkness and vice-versa. Actually both Ansem (Xehanort) and Sora are right about what they say while Sora is "more right" because Kingdom Hearts is a fairytale and light is always shown to be the stronger force in the end. So Kingdom Hearts is "both". Simply everything is connected to Kingdom Hearts so even the doors which appear, meaning the doors which really look like doors or doors like the "door to light" which is said to be the heart itself are also a part of Kingdom Hearts. And of course that is obvious, because as the story and Kanno already said, Kingdom Hearts is the source of everything, the heart of all worlds, the heart of all hearts.