How to turn off Apple TV?
If you mean sleep. Which effectively is turning it off.

On 3rd Gen.

Hold down the Play/Pause button for 5 seconds.
The Apple TV will go to sleep.

On the 4th Gen.

Hold down the the Home button for a couple of seconds, Looks like a TV.

You will then get a option dialogue to Sleep or cancel.