How do I get my phone to stop fading to black after I do not touch the screen for a while?

I may be looking something up on the Internet or something, and after a few seconds my screen gets darker. Not completely black but just light enough for me to see. Then if I do not touch it after it is faded, it will go completely black. I know there is a way to stop that because I turned it off before the update but after the update it started to do it again. Please tell me how to fix this.

I may be looking something up on the Internet or something, and after a few seconds my screen gets darker. Not completely black but just light enough for me to see. Then if I do not touch it after it is faded, it will go completely black. I know there is a way to stop that because I turned it off before the update but after the update it started to do it again. Please tell me how to fix this.