If your garment is surged, then you will have a lot of thread that overlaps the edges of the seams in a zigzag or looping pattern. This stitching prevents your seam from fraying during wear and washing. These threads can be removed if they are damaged. If they are not damaged, leave them alone. We are only interested in replacing the seam threads at this point.
Now you are ready to tie off the loose threads.