If you want to know how google rank one page higher and than the other then look at this infographics.The designer has included many factors which google consider while ranking your pages.
If you are a beginner and want to know how google algorithm works than this infographics is for you because it is designed by well known SEO experts i.e Niel patel.
Recommended:What is wordpress theme framework
Here is the link to the original infographics post.
You may also like:Use flickr to find free images for your blog posts