Well, first you aren’t looking at css. You’re in a php file that likely has a mix of html and php.
Your best bet if you don’t understand the code is to just start playing with template tags. As long as you put them in the loop they will do something. They are just bits of code that tells wordpress to grab something from the db and print it as html on the frontend.
The loop is a way to structure how and when those things get printed. if posts
is looking to see if any posts exist. If any exist no matter how many it will do something once. While have posts
looks at how many posts you have and does something one time for each post that exists. The post
is just a way for wordpress to get all the db info regarding your posts.
You need to put the image in the if posts part of the loop so that you get the one image in your page. You need to manually set your class so you can target it later with css and avoid the visual editor quirks.
Hope this makes some sense to you. The best thing for you to do is just backup your current files and then start breaking stuff. Pull things out of the current page.php template, add new template tags, insert the image in different places and see what happens. Once you get a fair understanding of how to do what you want specifically restore your backup and make the mods.
Best of luck
Resources:
https://codex.www.ads-software.com/Template_Tags
https://codex.www.ads-software.com/The_Loop