Joomla provides you with a powerful and safe way to override your site's default HTML layouts.
Why does it matter to you? Making changes to Joomla's core files is often necessary.
The wrong way is to directly edit Joomla's files. If you do, you'll lose all your changes when you next update your site.
The right way is to use an override. You can place copies of any layout file into your /templates/ folder. Joomla checks this folder first before loading the original files and if it finds these files present, it uses them instead of the core files. If you're new to using overrides, check out OSTraining which has 13 great tutorials on using template overrides.