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.