Firstly approach it slowly. Cover the whole bird with a heavy cloth, jacket, etc. Be careful of the bird’s talons. The talons are the bird’s defence and it will try to strike out at you. If at all possible, grab its legs from behind, near its body, and thus keep the talons from you.
Put the bird in a box, keep it warm and quiet and call your nearest Wildlife Rehabilitation Centre for help.