That looks like damping off. To prevent that in the future, make sure the container has good drainage and be careful not to overwater. Putting a fan on them for a few hours a day can help dry out the top of the soil too. The safest course of action would be to toss the affected plant, soil, and container to prevent it from spreading. With that being said, I have saved seedlings before by cutting above the affected section and rooting it as Edmick suggested. It works sometimes. I have also saved plants on occasion by hitting the stem with Daconil (a fungicide). Lowe's and Home Depot usually carry it. That can also work, as long as the pathogen isn't also attacking the roots. I would also move the infected plant away from the others and repot with fresh potting soil, since damping off is caused by soil-borne pathogens. I would also replace the container itself, or at the very least clean out the container with a bleach solution before repotting. Changing the soil will also give you a chance to look at the roots. If they are all brown and mushy, then it could be best to go for the cutting and rooting method, if you still want to try to save the plant.