There should be instructions inside the box when you get it. And, it sounds like it's the source of your problem.
I recommend bleeding the master off the car to remove air pockets from inside the cylinder. ( When on the car, the pedal doesn't push the pistons all the way forward so you can't get all the air out that way ).
Fill the master cylinder resevoir with brake fluid and use a screwdriver or something to push the piston all the way forward. Before you release the piston, cover the holes in the cylinder with your fingers to prevent air from entering the cylinder when you release the piston. Then release the piston. This causes fluid to go from the resevoir down into the cylinder instead of air returning back through those holes.
Repeat this process until no air comes out the holes. Once you do this, keep your fingers on the holes to keep the fluid from coming out. You don't want the master cylinder to lose its fluid once you have bled it this way or else it'll fill with air again.
If you have the right size rubber plugs, use them so you dont have to hold your fingers over the holes. Make sure you replace the rubber seal for the booster where the pushrod goes through, if it came with a new seal. If you have a new one, make sure you remove the old one, dont double them up.
Put the master onto the studs on the booster. Unplug or remove a finger over one of the holes and screw the brake line fitting into the hole. It only has to be finger tight at this point. Repeat for the other hole ( if it has more than one, I'm assuming it has two ). Hopefully you havent let the master gravity bleed itself dry as you were installing it. If you do, you have to remove it and bench bleed it again to remove the air.
Some people dont, but I bleed all four brakes after doing a master cylinder.
* If you install a new master it's ok to push the pedal all the way to the floor as you bleed the brakes. If you bleed brakes with an old master cylinder, dont push the pedal more than about half way. Brake fluid contamination causes corrosion on the farther portion of the inside of the cylinder because the piston never contacts it ( the pedal normally never goes more than about half way down ). This corrosion will damage the piston seal as the piston moves past it causing the master to need replacment. Just a bit of advice learned through experience.
The new master should come with complete instructions, if I ramble too much to make sense of.