In order to access to the same database where are you working outside the database server you must activate the service called listener, it has to be listening.
It can happens that the database is properly raised and can not connect from other servers, which are also set correctly (correct TNSNAMES, etc.)..
In these cases could be that the listener has a problem, or simply has not been initiated.
To Check the status, start or stop it is very simple. Just open a command line session (console terminal, etc..) with the user that has installed the database, and run the lsnrctl command with the following parameters:
Check your state:
> lsnrctl status
Stop the listener:
> lsnrctl stop
Start the listener:
> lsnrctl start
Keep in mind that when you stop the listener, the connections that are already in the database won't be closed, so a short stop is not very traumatic, only connections trying to enter while the listener is stopped are rejected, should not affect anyone who already has an opened session.