The wire than runs from pup to guitar came out from the pickup, is the pickup ruined or is there anyway to fix this situation?
What kind of pickup is it? Humbucker/singlecoil, covered/uncovered? Is it the ground or the hot? It's absolutely possible to fix some situations are just better than others.
Open up the back and solder it back on.
It's a single coil. both leads are disconnected. Do I just find two leads from the pup wire and solder them to the wire going to the switch? The pup has tape around the wire, but is otherwise uncovered.
You solder two wires onto the places where there wires broke off from.
See the rivets on this pickup? The wires should attach to those. This one has four because it is technically a humbucking pickup but you can ignore that.