Hi!
The broken headphone jack needs to de-soldered from the motherboard and replaced with the new one, that needs to be soldered back on. At the same time you need to use a special soldering iron (or a very good one) to melt the solder. Also, laptop boards are very complex and usually multi-layered, therefore using a soldering iron could break some traces or parts on the other side with no visible damage, aggravating the problem. A more elegant solution would be replacing the entire board or even taking it to a computer repair shop.