Usually if you just specify LOCALHOST, that goes to the default instance which is not SQLExpress.

Do this: start->run->Services.msc. Then look for SQL Server. See if there is a SQL Server(MSSQLSERVER). If there is, start it if it is not already started.

If you see other services, for example, SQL Server(SqlExpress) or SQL Server(MyNamedInstance), you should connect to those using LOCALHOST\SqlExpress and LOCALHOST\MyNamedInstance, respectively. If you have a service called SQL Server (MSSQLSERVER), you can connect to it just by using LOCALHOST as the server name.

In the services.msc just SQL Server(SqlExpress) was strt and when i tried to start Server(MSSQLSERVER)show this error :

Windows couldnt start the SQL Server(MSSQLSERVER)on local computer . for more information review the System event log. If this is a non-microsoft service , connect the service vendor, and refer to service-specific error code 10048

I started the "sql server(MSSQLSERVER)" and "sql Server Agent(MSSQLSERVER)" from sql configuration manager and then i could connect to databse using localhostbut whenever i restart the computer or turn it off, again the sql server(MSSQLSERVER) and sql Server Agent(MSSQLSERVER)go off and i should start it again to be able to use localhost.Why it is like this ?

That is strange. If you are able to start it up manually, and if the startup type is set to automatic, when the computer starts up, the service should automatically start. Look up the event log to see if there is any clue there.