Let me give a very fast summary of a typical player’s career arc through contracts
Entry into pro ball: Players may be drafted directly from high school or college. If you are 18, you have 4 years of the team setting your contract in the minor leagues. If you are 19 or up, you have 3 years of the team setting your contract in the minor leagues. Both of these are the maximum amounts of time you can spend in the minors before you must be added to the major league roster. If you are not, there is a second draft, called the Rule 5 Draft where all the other teams have a crack at putting you on their team. Click the link for more info.
Years 0-3: Players with less than 3 years experience, which is measured by days they are actually on a major league roster, have their contracts set by the club. This means the team pays them whatever the team deems them worth and the player has no alternative to contesting it. A few notes here: first, “experience” is measured in days with a certain number of days equaling a year. It is not uncommon for horribly cheap teams, like my Pirates, to hold off on calling up minor leaguers until sometime in early June. This maneuver assures that that year will not count as a full year, so it essentially gives an extra year of setting the player’s contract. Also, it is possible to play well enough in your first 2 years to progress to the second step; these “super 2s” meet some crazy criteria and it is a pain in the ass to try to understand.
Years 4-6: Players become eligible for arbitration. If a contract can’t be agreed upon after the year, the player and the team each submit a figure and an arbiter decides on one or the other, no compromise in the middle. This creates the uncomfortable situation of teams submitting lower offers and then crafting an argument about everything wrong with the player to the arbiter. The arbiter has no power other than weighing each case and determining whether to accept the player’s figure or the team’s. This is the first place in which a player’s contract escalates to seven figures quite quickly; as such, it is not uncommon for a team to “non-tender” the player by not offering a contract. In such case, the player becomes a free agent. Due to the lack of year-to-year assurances, it is also not uncommon for teams to guarantee a multi-year contract through arbitration in exchange for either guaranteed year-to-year stability for the player or for less money. See: Ryan Braun’s recent contract.
Free agency! Years 7+: Huzzah! After 6 years, a player finally is able to shop himself on the open market. Their current team is allowed to offer arbitration similar in structure to years 4-6; however, the player now is under no obligation to accept. Sometimes players do accept on the grounds that they can get more in arbitration than on the free market. If they do not accept, they can sign a contract with any team and their team may receive a compensatory draft pick. Allowing players to leave after offering arbitration is how the Oakland A’s built up a surfeit of draft picks in recent history.
A few last notes on trades: no trade clauses are not uncommon for veterans to insist on. Also somewhat more common are limited no trade clauses, where a player specifies specific teams that they cannot be traded to (or a limited number of teams they can be traded to). As previously mentioned, a player with 10 years experience and 5 on his current team also cannot be traded without his permission–this came into play with the Ken Griffey Jr. to the White Sox trade.
Contracts of 10 years are almost unheard of. The average is probably around 2-3 years with contracts over 5-6 being very rare. Since contracts are guaranteed, teams want to have some guarantee of year-to-year performance whereas players generally always think they will outperform their contract and always get more money on the free market. One year contracts are quite common simply because they don’t lock the team into an underperforming player and a player can outperform and quickly earn himself more money.