The Nintendo Switch comes with a device called the "Joy-Con Grip," which turns the two handheld Joy-Con controllers into a sort of gamepad. Unfortunately, the Grip cannot charge the Joy-Con.
Out of the box, you can charge the two Joy-Con by sliding them on to the Switch tablet and then sliding the tablet into the Dock. It's a fine solution if you're putting away the console for the night, but it's a pretty terrible solution if you're in the middle of "Breath of the Wild" and your gamepad starts running out of juice.
What if you want to keep playing? The sad news is, out of the box, there's no way to play the Switch on your TV while simultaneously charging the Joy-Con. You could slide the Joy-Con onto the Switch tablet and play the console as a handheld, which will charge the controllers, but what if you want to play it on the TV?
In that case, you have one option: buy something. Nintendo's selling a $30 piece of plastic that enables you to slot in your Joy-Con controllers and charge them while you're playing games on the TV. Keep in mind this isn't a second gamepad, but simply a means of charging the one you already own. Ugh indeed.
Total cost for one Joy-Con charging Grip: $30