Meanings
Fig.: to be greatly mistaken.
(slang)

Examples
He really pulled a boner when he accused me of drinking his bottle of brandy, since I don't drink any alcohol at all
Ha veramente preso una solenne cantonata quando mi ha accusato di avergli bevuto tutto il suo brandy, dato che io sono completamente astemio

I'm afraid you've pulled a boner this time: we are heading north and we should have turned south ten miles ago
Ho paura che tu abbia preso una cantonata: stiamo andando a nord mentre avremmo dovuto girare a sud dieci chilometri fa

Origin
This expression is derived from the noun bonehead, for "blockhead" or "stupid person"