Here's an explanation of how free agent compensation works in baseball.
Teams can choose to offer arbitration to their free agents after each season. If the player accepts, the team will get the player on a one-year deal at a figure determined by the arbitration process. Typically, players who accept arbitration get raises. If a player rejects arbitration, his former team gets nothing but compensation picks.
A player can either be classified as Type A, Type B, or nothing based on his stats from the previous two seasons in certain categories, depending on his position. For example, first basemen, outfielders and DHs are rated based on the following categories: plate appearances, average, on base percentage, homers, and RBI.
If a team signs a Type A free agent, they have to surrender a top pick to that player’s former team. If the signing team placed in the bottom half of MLB teams, their draft pick is protected and they surrender a second-round pick instead.
Sometimes, teams sign more than one Type A free agent. In that case, one team gets a top compensation pick and other teams lose out. The team losing the highest-ranked free agent obtains the best pick the signing team can offer and other teams fall in line behind the team that loses the top-ranked player.
Regardless of where Type A free agents sign, their teams obtain a supplementary round pick in the following year’s draft (plus a pick from the team that signed the player).
A free agent can also be classified as a Type B based on his stats. Teams don’t have to give picks up to sign Type B free agents, but teams that lose Type Bs obtain supplementary round picks in the next year’s draft.
Another rule to consider for Type As and Type Bs: the "losing" team can receive draft pick compensation without offering arbitration if their free agent signs before December 1st.
There’s also a third possibility – the free agent is not classified as Type A or B, and there is no draft pick compensation.
Over the years, many quality players have been drafted as the result of free agent compensation. Recent examples include Huston Street, Phil Hughes, Clay Buchholz, Jacoby Ellsbury, Joba Chamberlain, Colby Rasmus, and Ian Kennedy.
I owe most of my understanding of free agent compensation to ESPN's Keith Law. Check out his blog post on the topic from '06 as well as an MLBTR post about the ranking formulas based on info provided by Keith.
Ben Nicholson-Smith contributed to this post.