To turn off your Nintendo Switch, press the POWER Button. The length of time you hold the POWER Button down determines which state the console enters.
To enter Sleep Mode (Press the button for a short time)
Pressing the POWER Button for a short time will make the console enter Sleep Mode. This is the recommended way to turn off the console as it will quickly suspend whatever game you happen to be playing. Pressing the POWER Button again for a short time will allow you to resume playing from where you left off.
<Additional Note: Other ways to enter Sleep Mode>
The following is a list of alternative methods to enter Sleep Mode other than pressing the POWER Button for a short time.
Press and hold the HOME Button for 1 second or more, then select "Sleep Mode".
Select "Sleep Mode" on the right-hand side of the HOME Menu.
To turn your console completely off (Press and hold the POWER Button for 3 seconds)
Press and hold the POWER Button for 3 seconds to bring up the Power Menu. If you want to turn the console off completely, select "Power Options" → "Turn Off".
If the console will not turn off normally (Press and hold the POWER Button for 12 seconds)
Press and hold the POWER Button for at least 12 seconds to force the console to shut down. Use this if the console has frozen and will not turn off normally for whatever reason.
<Additional Note: About charging>
You can charge your Nintendo Switch when it is completely turned off, but any attached Joy-Con controllers will not be charged in that case. If you want to charge your Joy-Con controllers, please do so in Sleep Mode.