How do I avoid a pinch puncture?
Most likely:


You didn't repair the original puncture properly, and air was still leaking from that site.
Whatever caused the puncture in the first place is still in the tire, and re-punctured the tube. 
There was more than one puncture, possibly a small one that you didn't notice when finding the major one.


Possibly you also nicked the tube with a tire lever when getting the tire off. I think this might be what you are alluding to in your title.

By the way a 'pinch' puncture or flat usually refers to a puncture caused by the wheel hitting a bump that deforms the tire so much the tube is pinched between tire and rim. Frequent pinch flats indicate tire pressure is too low for the surface being ridden on.