There are a number of options: many need the water shut off and the water emptied from the copper pipe.
A physical repair clamp that is installed over the leak area. Head to a hardware store or plumbing supply. This needs to be looked at as a temporary fix.
A variety of materials, many epoxy based, may be put on the leak area after the water is off and the pipe is drained, and the external pipe surface is cleaned well to removed grime, dust, and corrosion. These are also available in the plumbing section of a hardware store
Link Quick Fix
Patch the pipe with a coupler. If you need to fix a puncture fast and correctly but you don"t have any additional pipe on hand – just a coupler and solder, that"ll do just fine. Cut the pipe over the pinhole leak so the pipe splits in two. De-burr the edge, and clean the edge. Apply your flux to both ends of the pipe and attach the coupler – then hit it with your torch and apply solder. This repair isn"t actually as good as replacing the pipe – but it"s the next best thing.
Change the pipe
With one pinhole, there are likely others that will be coming, Copper pipe is very easy to replace with some simple soldering skills, but call a plumber if in doubt. I would take out the defective area and inspect the inside carefully to determine the level of the corrosion and how much needs to be replaced.