Whenever you do a search using Yahoo or Google, or any other program, it scours the Internet for your keyword(s) to see what the best matches are. It doesn't know what you want, but rather it looks for places that have the "most" of what you said you wanted. It is a probability thing.

So, what determines who is shown to you first? That is the magic (and business) of search engine optimization. It is, essentially, "optimizing" a target's probability to be listed in the top sources to be shown based on a keyword. They do this by increasing the number of keywords available on their site. That is search engine optimization.

Let's take an example. If I sell widgets along with 2 other competitors and we all have web sites, Google will search this (and any other possible competitors) when you type in "widgets" in the search bar. If I have the most entries for "widgets" on my website, I will be listed first, and, as such, the most seemingly credible source for widgets out there. That is the business of search engine optimization.