We all talk about "relevant links from trusted sites...". I always wonder though how exactly does Google measure how relevant the content is? Has the algorithm been publicly described in any patents? Does it take into account word frequencies and match the spectrum of the words used somehow? Man... I wish there was a "relevancy checker" Actually I just thought of an interesting way of measuring it, as soon as I posted this post The google text link unit shows in theory the keywords that Google thinks the page is associated with...
The spiders scan the pages and check how many times phrases are used etc. etc. i'm not sure exactly about the algorithm though.
in my opinion , google looks the words . if there are same words on both sites, google says that these sites are relavant
no one really knows the exact way of how google measure relevance. only google knows. i guess thats what makes them stand out from all the other search engines. If you just follow google's webmaster guideline, you'll be fine.
check this www.google.com/adwords/learningcenter this has demos and choose the relevant demo ......and i guess this clears your doubt