So, first of all you need to get it all back to a starting setup, in other words undo any adjustments that have been done to compensate for the wear of the old pads. Your brake levers should have an adjuster on them like this:
You need to set them up like the picture above - screwed right into the lever body. Loosen the lockring (the bit nearest the body) first, then screw the adjuster into the body. Retighten the lockring.
Then you need to fit the pads correctly - some good advice in this thread, maybe this helps:
The parts highlighted need to go the other side of the caliper arm - on both caliper arms.
Now, assuming you have got the pads in OK and they are aligned with the rims OK, you need to sort out cable slack. If necessary undo the cable clamp (shown below) and adjust the cable, reclamp it to set the caliper up to be as close to the wheel as you can without any rubbing and making sure when you pull the lever that it applies the brakes firmly without having to pull too far. If you have a little bit of adjustment to make then you can use the adjuster on the lever to fine-tune it.
For extra finesse you can make sure the caliper pulls equally from both sides by adjusting the tensioners (below) - make small adjustments, one side at a time, and see how it affects the application and return of the caliper arms.
Having done all this, over time your new pads will wear meaning you have to pull the levers further to get the brakes to work - when this happens simply use the adjusters on the brake levers to bring it all back where you want it.
It is possible that your old brake pads were incorrectly installed in the first place - now's the time to check and make sure it is all in perfect working order. Brakes is one place not to take chances.