You didn't say what kind of material your pants were made out of, so I will assume blue jeans. I think you mean the fabric was torn instead of the seam stitches being ripped apart, so here goes:
Go to a fabric store, look for iron-on jean patches or other iron-on material, and purchase enough length to cover the seam. Turn your pants inside out and trim the edges of the rip so there are no stray threads and the edges are relatively even. Trim the patches (rounding the corners slightly so as not to have a point to catch on your leg) to fit at least an inch beyond the tear on each side, or at least enough to give some support from the good fabric on the sides of the tear. The patch instructions might have suggestions. Butt the edges of the rip together as close as possible. Put the trimmed patch over the rip and follow the directions from the patch package for the iron heat required and iron appropriately. You could also put patches on the outside if you wanted to, but this will at least close the hole and give you some more wear for awhile. You may have to reiron or replace the patch if the edges come undone, but that's easy. Good luck.
Lovely Lillith, May 2004