Welcome, dpmac10!
You can buy one of those breeding plastic floater container (sorry, I forgot what they're called), and put the pregnant fish there.
The breeding container floats on top of your tank. It has two parts to it. The top is where the pregnant female goes, and the bottom is for the babies. They are separated by a divider with tiny holes on it for the babies to fall through when they hatch, safe from the parent fish.
Or, you can get another tank, a small one will do. You can put the female there when she's very pregnant, and take her out when the babies hatch.
Don't worry if the babies get eaten on the first try. Swordtails are very easy to breed, and can breed every 3 to 4 weeks if you have enough males and females.
Sometimes you will see a dark spot on the pregnant fish's belly. It's probably the eyes of the babies, a sure sign they're about to pop out.
Good luck!