This exception allows teams to spend money on their first round draft picks without affecting their salary cap. The Collective Bargaining Agreement sets up a rookie scale that determines exactly how much a rookie contract is worth based on when the player was selected. The first selection in the draft makes the most with subsequent picks making a bit less.
The rookie scale also sets up set contract term limits. Each player drafted in the first round gets a 2 year guaranteed contract with a team option for the third and fourth years. There are also raises built in to account for rising salaries across the league. There is another wrinkle to the rookie exception. A team may spend more than the rookie scale for a drafted player that went unsigned if the team owns his draft rights three seasons after the draft. The team may only spend its available cap space and the contract must be for at least 3 years. The rookie scale was created to prevent teams from over-spending on high draft picks.