What do you do to focus on your writing when you have a hard time concentrating?

I’m taking a Writer’s Digest class and would love your help.