you'll need to turn two nuts onto the stud, and tighten them against eachother.
continuing to turn the lower nut against the upper nut will allow you to take the stud out.
turning the upper nut against the inner nut will allow you to secure the stud back in the head.

take the stud all the way out, clean the threads with a wire brush, apply anti-seize, and reinstall it.
its also easy to put studs back in if you have a dome nut