

The algorithm assigns a numerical weight to each element of a web page. Two of the most important factors for PageRank are Keywords and Backlinks. The major search engines change their algorithm from time to time. The exact figure that Google gives to each aspect of the PageRank is a highly kept secret. But there is a very good article The Google PageRank Algorithm and How It Works by Ian Rogers that explains in detail how the process works.
To calculate the Page Rank for a page all of its inbound links are taken into account. As each page within a site is ranked separately all internal links to a particular page are also taken into account. The amount of outgoing links on the referring page are also taken into account, if there are too many (no-one outside of Google knows how many is too many) the value of the link to your page goes down. This is one of the main reasons that you need to avoid link farms. The referring page also needs to include information that is relevant to your site, another reason to avoid link-farms.
As of April 2010, Google also includes the load time of a page in the algorithm but it does not have as much weight as back-links and keywords.
Panda is not a new algorithm it is a ranking factor. It is named after engineer Navneet Panda. Panda was introduced in the states in February 2011 and went into effect for all English speaking users April 2011.
In August 2011 Panda went global.
Google used a control group of human site raters and compiled what they liked about certain sites. This information was then comprised into very complicated ranking factors.
With Panda, Google wants to favor sites with high quality content rather than sites with low quality content. Initially when Panda was first rolled-out some sites with original content got lower rating than scraper sites. Google has already updated Panda a number of times and is periodically refining the algorithm which they say has now fixed the problem. With Panda the rating appears to be based on the entire site rather than an individual page.
Panda takes into consideration the user experience and although the ranking factors are a tightly held secrete. It is thought that they track social media, other possible factors are:
Rather than scrolling down the page past a slew of ads, users want to see content right away. So sites that don’t have much content 'above-the-fold' can be affected by this change. If you click on a website and the part of the website you see first either doesn’t have a lot of visible content above-the-fold or dedicates a large fraction of the site’s initial screen real estate to ads, that’s not a very good user experience. Such sites may not rank as highly going forward.Matt Cutts, Google