Amazon uses Collaborative Filtering, which is a technique where there are multiple ways to find similar users or items.
With User-Based Technique, a visitor to Amazon.com would be matched with other customers who had similar purchase histories, and those histories would suggest recommendations for the visitor.
For e.g., If I buy an iPad, amazon will match my purchase history with other customers who have bought iPad as well and with their purchase history amazon will suggest me similar products.
With Item-Based Technique, the recommendation algorithm would review the visitor's recent purchase history, and for each purchase, it will pull up a list of related items.
For e.g., If I buy a sofa set from Amazon, it will pull up a list of items like: Throw pillows, seat cover etc.
Collaborative Filtering provides an effective form of targeted marketing by creating a personal shopping experience for each customer. It is able to react immediately with resect to changes in customer's data and makes compelling recommendations for all users.