How can I make my site only accessible to logged-in users?
There is a permission in the permissions list called "View published content". The permissions are set under /admin/people/permissions. You can remove this permission from the Anonymous user.

If you want to show some pages but not all of them, more granular access controls can be set up with Content Access.

Custom 404 and 403 pages can be set to use any content on your site, using settings at /admin/config/system/site-information (in Drupal 7). Sidebars are automatically hidden on 404 and 403 pages but if there are any other blocks (such as menus) you want to hide, you can control which roles see those on their block config pages. 

The content of these nodes will also be unaccessible to anonymous users unless you install Content Access and make at least th 403 page allowed for anonymous users. I suggest allowing the 404 page too. Otherwise, you can still get info through if you put it in a node-specific template for your custom 404 page. 

The login block can also be invoked programmatically in a tpl.php file with the code from this d.o comment or it can be shown to anonymous users via the block settings.