It is what google ranking is said ot be based upon. though they keep their exact algorithm secret afaik.
In a nutshell, you give each page a base score, and have it give away part of its score to the pages it links to.
Assuming that the page author wouldn't link to a page with poor/irrelevant content, you get some sort of quality/popularity score for each page.