The 15-member council agreed unanimously that the International Security Assistance Force (ISAF) will be led on the ground by Britain.
It will be under overall US military authority, with the US prepared to provide assistance in an emergency.
The force's main task will be to provide a stable security environment for the new Afghan administration, which will be sworn in on Saturday.
Shortly before the vote, a company of 53 British Royal Marines - the first visible element of the force - landed at Bagram airbase north of Kabul.
Another 150 will join them in time to provide a presence for the inauguration of the interim government.
"It is the initial stage of ISAF. We are here to start providing security and assistance," company commander Major Matt Jones told reporters at the air base.
In other developments:
The UN resolution does not stipulate the number of troops, which is still being discussed with members of the Afghan interim administration.
A spokesman for the UK Ministry of Defence said it was "along the lines of 3,000 to 5,000".
The UN Security Council agreed that the force will initially have a six-month mandate.
It will be made up of European and non-European forces, led by British troops for the first three months before another country, possibly Turkey, takes over.
Major Jones said the force would be lightly armed, and described its mission as a "peace support operation".
The UN resolution authorises ISAF troops to use force where necessary.
But Afghanistan's Interim Defence Minister Mohammed Fahim said the troops would have no authority to disarm belligerents, interfere in Afghan affairs or use force.
'No conflict'
A BBC correspondent says there has been difficulty agreeing how long the force should stay in Afghanistan and what its relationship should be with the American-led military campaign in the country.
But all the major sticking points which held up a vote on the issue for days have now been resolved.
The British Prime Minister Tony Blair said there will be no conflict between the US's ongoing war in the region and the British-led security presence.
"The force we will be sending in on the peacekeeping mission will be quite distinct from those forces engaged in war fighting," he said.
For most Kabul residents there is little doubt that the presence of an international force will reassure them that the world will not allow factional fighting to ruin their hopes of peace once more.
The resolution also calls on the victorious Northern Alliance to withdraw its troops from Kabul, in accordance with the agreement reached last month at a multi-ethnic conference in Bonn, Germany.
Afghan caution
Afghanistan's new leader, Hamid Karzai, said he hoped the new force would not stay longer than is planned.
He said the international force should leave "as soon as we have the protection of our borders, of our country and a government chosen by the Afghan people".
Although its first elements are already on Afghan soil, the force may not be fully operational until mid-January because of its reliance upon Bagram airport - located in a heavily-mined area 40km north of Kabul - for both deployment and re-supply.
UK Defence Secretary Geoff Hoon admitted that the force - to be led by General John McColl - would face a "challenging, difficult and sometimes dangerous" task in Kabul, which is controlled by a number of armed factions.