Read about "SQL server surface area configuration" on MSDN for your version of SQL Server. Go here to start: https://msdn.microsoft.com/en-us/library/ms161956.aspx
In short, you have to do more to share a database over the network even if you can access it locally (server, desktop or laptop where you have install the SQL Server).