When I promote the windows server to a domain controller, the local accounts were inaccessible in the server, but when i De-promote the domain controller to the normal server the local accounts were accessible. So where the local accounts of the server would be stored after promoting it as a DC? And even after the deletion of the active directory i can logon to the client machines with the domain user account, how it is possible? Why those domain accounts weren't deleted??
When you promote a normal server to Domain Controller, the local groups and users will become domain groups and users located in the Builtin container, they are stored in the AD database.
If you remove the DC to a normal member server, then the local users & groups will be restored like before, but the other domain users will become unaccessible since the ad database has been removed. The reason you can use a domain user to logon the client machine is the domain users' credentials and passwords are cached locally. In case when the DC is unavailable when you login, the OS will permit you login use the cached domain users credentials. But it is only restricted to the domain accounts which have cached before, you cannot use the accounts that haven't been cached to login the client machine.