When you don't want any user to connect to database, you can simply restrict your instance from any incoming connection. But if you don't know this concept and you have come across the below error, it means your database is in sort of maintenance mode and you need to disable it to enable users to connect to it via listener.
Note: Maintenance mode still allows users to connect to database without listener, of course you can only do it when you are on DB server and you are not using listener for DB connection i.e. no use of @SID.