Originally, everyone in the area claimed the Oregon Country: the British, Americans, Spanish, and Russians. Why did Russia give up its claim to the region? What did they get in return?
The Russo-American Treaty of 1824 established a clear border between American and Russian lands on the West Coast as well as trade. It gave Russian claims south of parallel 54°40′ north to the US.
Russia was inclined to give away this territory, which was in dispute between them, Britain, America and Spain, to insure their undisputed and ongoing ownership over Alaska. They were in no position to enforce their claims militarily and the trade value of territories other than Alaska was limited. They decided to get the best agreement that they could to avoid conflict.
A few years later, even Alaska became difficult for them to manage, and, once again fearing losing the land without compensation to either the US or Britain, they negotiated the Alaska purchase.
Russia (and Spain) had the weaker claims to "Oregon." Russia claimed only a piece of the territory between 54 and 51 degrees parallel, basically as an extension of Alaska. This claim had to be backed up by forces coming all the way from European Russia through Siberia. Likewise, Spain claimed basically the modern Oregon, not the whole country, as an extension of California. But when Mexico (which then included California, Texas, and almost everything in between) won its independence, Spain's claims to the Oregon country disappeared.
That left only Britain (via Canada) and the U.S. (via the "Louisiana" Purchase territories), to claim the whole territory that the British called Columbia, and the Americans called Oregon. Since their claims in the region were small and tenuous anyway, Russia made separate treaties with Britain and the United States to relinquish her "Oregon" claims in exchange for their recognizing her ownership of nearby Alaska. Britain and the United States then settled their claims by dividing it along the 49th parallel, with Britain's share taking the name British Columbia, and America's share being divided into Oregon, Washington, and Idaho.