Literally, the head of a pin (the side of the pin that is not sharp, usually having a small ball on it). Usually small, being only a millimeter or two in diameter. The derisive use of the word can not only refer to the person's crainial capacity, but also to the fact that they are just not "sharp" (quick witted, intelligent, etc)