"碰钉子 (Pèngdīngzi)" literally means "to hit a nail." This idiom comes from the imagery of hitting a nail and being stopped or hurt by it. It's used to describe encountering difficulties or obstacles, much like hitting a snag that impedes progress.
For example:
Zài shēn qǐng qiān zhèng shí, wǒ pèng dīng zi le, shēn qǐng bèi jù jué le.
在申请签证时,我碰钉子了,申请被拒绝了。
I hit a snag when applying for the visa; the application was rejected.
Source:eChineseLearning