The wire screws into the connector that attaches to the spark plug. The end of the wire should have a short, thin metal stud that looks like a fine threaded screw on the end. That part screws into a female piece down inside the resistor(piece that connects to spark plug).
If nothing's damaged, you should be able to easily reconnect the two pieces. I just went out in the garage and took apart and reassembled a spare Bosch wire in about 30 secs.