Valves can be soldered on, threaded on, or held in place by compression fittings. Hard to say how to replace yours, since it could be any one of those three methods of attachment. Generally, the most common attachment on newer homes is a compression fitting. Older ones may be soldered or threaded on. A picture would make it easier for someone to tell, but given the description, you can probably tell yourself. A compression fitting will have a separate compression nut on the backside. A threaded one will probably have some threads showing on the pipe. A soldered one won't have any threads, nut or wrench flats on it, since you don't need to turn it once installed. Actually, there is a fourth method - a push-on, cinch valve. This won't have any wrench flats, threads, or nuts.