Swordtails are very easy fish to breed. They are livebearers, and the fry (baby fish) come out large enough to eat ground flake foods.
Breeding:
Swordtails will breed under almost any regular conditions. Often, the females you buy at the pet store are already pregnant. Usually, no special setup is required to get Swordtails to breed. Midway through pregnancy, the female will get a dark spot on her tummy called a "gravid spot." This is a good indicator to look for when checking if the female is pregnant. The best indicator, however, is the size of the pregnant female’s tummy.
Tank Setup:
It is not necessary to get a separate tank as the fry will probably survive the few hours before you notice them. As long as your tank does not have any huge or aggressive fish in it you can leave the pregnant mother in the community tank. Plants and other hiding places will help the fry stay safe.
Birth and handling of fry:
The female will usually give birth in the early morning. A day or two before giving birth, a female’s tummy will look almost squarish. Depending on the size of the female, there can be 5-50 fry born. How can you protect the fry from the other fish, including the parents who will try to eat them? The best option is to get a breeding net. They can be bought at pet stores and you hang the net in your tank. This way the fry will be safe from the adult fish, get their own finely ground food, and the water quality will be as good as in your main tank.
Be sure to let them out once they are big enough to avoid being eaten -- if they are kept in the net too long their growth will be stunted.
If there are lots of hiding places, few fish, and no very large fish, then you might not need to provide a breeding net-- the fry might survive by themselves in the tank. Be prepared for losses, however, and doing this is somewhat risky.
The female:
It is extremely stressful for livebearers to give birth and the female often dies afterwards. To avoid this, don't keep aggressive fish with her and provide lots of hiding places.
Raising the fry:
Feed finely ground flake foods. Swordtails are somewhat fragile, and will likely get diseases-- expect losses. Once males start developing their tails, any older males you have will get into fights with them. If you have too many fry, lots of pet stores will accept them when they are mostly grown.