Internal factors: characteristics of the text and links within the page—the page title, content headings, the body text, the alternate text in image html tags, web links both internal to the site and external to other sites, and the frequency and distribution of topical keywords. Organized meta-information such as keyword and description html meta tags also factor in page ranking, although not as heavily as page titles, headings, and words within the page content. Even your domain name and the names of files and directories within the url of your web page may count toward relevancy rankings.
External factors: the degree to which your page is linked with existing highly ranked pages on the same topic, how often people who get your page in their search results click on the link to your page, and other statistical factors that the search engines glean from their own data on the searches users perform and the link choices they make for a given topic or keyword. Links from popular pages that link to your page are essentially votes that your page is relevant to the search topic. Links from high-ranking pages are the most important factor in determining rank, but overall volume counts, too: the more links your page has from other pages and the more search users who click on your page link in search engine results, the higher your overall page ranking.