Sharp objects and rough handling can tear even new bed sheets. If your sheet has a rip, don't replace the whole set. Mend it. A sewing machine that sews a zigzag stitch makes a smooth even repair. It is extremely difficult to hand sew a seam that is smooth enough to make an acceptable repair on a sheet and repair tape is rough and quickly begins to pull away from the fabric, making the problem even worse. Most tears in sheets are "L" shaped.
Pull the torn edges of the sheet as close together as possible and hold them temporarily with a piece of clear gift wrap tape. The edges should touch, but do not pull them so close that they make a fold in the fabric at the edges of the rip.
Set the sewing machine to sew as wide a zigzag stitch as possible with a short stitch length. On a zigzag stitch, the stitch length determines the angle between the stitches. Sew a test seam on a scrap of fabric. The stitches should be as close together as possible without the overlapping.
Start sewing 1/2 inch before the rip. Sew backwards three stitches at the beginning of the seam to secure it, then continue sewing along the rip. Follow the rip so the needle goes down into the fabric on the left side of the rip when it sews the left side of the stitch and on the right side when it sews the right side of the stitch. The threads of the zigzag stitch will be perpendicular to the rip.
Turn the corner on an "L" shaped rip by stopping with the needle down in the fabric on the same side as the corner of the rip and half a stitch width beyond it. The needle will be on the opposite side from the remaining part of the rip and about 1/8 inch past it. Raise the pressure foot, turn the fabric to sew along the other side of the rip, lower the pressure foot and continue sewing.
Sew 1/4 inch beyond the end of the tear. Sew backwards three stitches to secure the end of the seam. Remove the remaining tape.
Use tape designed for paper, not packing or duct tape. If the fabric of the sheet is getting thin, any repair will be temporary at best. The process of mending a worn sheet may tear it further. It is best to replace it.