Have a look at the Sections and Entries article in the official Craft documentations. It explains how to set up sections and how to configure them to load a particular template if an entry’s URL is requested. https://craftcms.com/docs/sections-and-entries
Another important topic you should get yourself familiar with is how Craft’s routing mechanism works. https://craftcms.com/docs/routing
To configure a template for your homepage you could create a template in craft/templates/index.html
and Craft will use it for homepage requests (routing case 4). Or you configure a section in such a way that the homepage’s URI matches one of the section entries’ URIs (routing case 6). Note that there’s also a special checkbox “This is for the homepage” available in the settings for single sections.
With a designated template for your homepage in place, you can now add your slider code snippet to it. In the case that this template is responsible for multiple entries, e.g., entries of a structure section, you could wrap it in a conditional to check against the entry’s ID for example.
{% if entry.id == 12 %}
<!-- Slider code -->
{% endif %}