The boards from which the Mishkan was assembled were covered with a thin layer of gold. These gold sheets were hammered to the boards with perfect symmetry. The final hammer blow was the one that finished the job. The melacha of makeh b’patish literally means the strike of a hammer but it refers to an act of completion. Any act of perfecting an object or rendering it fit for use is considered makeh b’patish even if it doesn’t involve a hammer (or any other tools).
Did you ever get a plastic fork that has pieces of plastic sticking out from the handle? Annoying, isn’t it? Of course, we all scrape it off with our thumbnail to make the handle nice and smooth. On Shabbos, this act of perfecting would be makeh b’patish.
Similarly, we may not render something fit for use for the first time. Putting new laces into a pair of shoes or placing a pendant on a chain for the first time is makeh b’patish. However one may restore an object to its useful condition, so replacing a lace that came out of a shoe or a pendant that fell off of a chain would be permitted.
In the previous example, the shoelace or the pendant may be reinserted because they are not considered “broken” when separated. An object that is considered broken cannot be repaired on Shabbos because of makeh b’patish. Therefore, if an eyeglass lens falls out of Shabbos, one may not pop it back into the frame regardless of how it easy it would be to do so.
Makeh b’patish is the reason for the rabbinic prohibition on music on Shabbos. Instruments frequently need tuning and minor repairs, such as changing a string or a reed. Playing instruments and related activities were prohibited on Shabbos to keep us far away from the likelihood of transgressing this melacha.
This is just an introduction to the concepts of the melacha of makeh b’patish; it is not a substitute for a full study of the halachos.