Woah. Yeah, that code has some problems.
tgoe's right, this is an indent error. That whole block of code needs to be indented so that it's inside the loop() function. The code still won't run, mind - there are a bunch of indentation errors throughout, and you need to fix all of them for it to work.
Moreover, the formatting of the program is pretty screwy. You call some functions before they're defined (I'm looking at draw_background in line 46) and just overall a lot of stuff is defined in the wrong places. Functions and classes go at the top of the program, after the import statements but before everything else. Also, you reference variables that aren't declared anywhere (again with draw_background() - it uses the background
variable, which you declare in main(), but you don't call it in main). There are a bunch of typos that are screwing up your code - field misspelled as feild, images misspelled misspelled as iamges, randint misspelled as 'randit' more times than I can count. I was going to repost your code with comments on all the lines that needed to be fixed, but honestly there are just too many of them for that to be practical. All I can say is, review your basic knowledge of Python, and proofread, man, proofread. You shouldn't be writing your code in one big 200-line chunk, you should be writing it piece by piece, and testing as you go.
I'd recommend scrapping all that code, and starting fresh. Start with something small and build on it until you have a full-fledged game. If you do decide to fix that program (which will probably actually take longer) and you have any specific questions, you can still ask, though there are other resources
you should check