The relevancy of the content is usually judged by such factors as keyword density of certain keywords or phrases a user is searching on, the page title, name of images, number of pages of the site with relevant content, how recent the content is, keywords in the headings and many other factors.