So if hill goes up behind coop, you need to dig a trench up there to catch the water coming down the hill and carry it around to the coop.
I hope this very rough sketch below helps you to understand.
Trench needs to go downhill a bit as shown in the top view.
It's kind of a tricky thing to do, even the best pics may not tell us where the trench needs to be and go, you'll have to do it yourself while 'reading' the slope.
Best done while it's actually raining hard enough to catch the water in the trench above coop, then you keep digging, adjusting depth and direction of trench, so the water keeps flowing where you want it to go.
I've had do this on my property, runoff comes down my slightly steep driveway and into the garage, so I dug a trench to carry it away down the slight slope off the side of the garage worked great for years...until it ended up being right in the middle of the chicken run, so more trenching and some underground pipe to carry it away from under the coop.