If two steel pins are sticking to the same pole of a bar magnet (say, the North pole), the ends of the pins touching the magnet will become South poles, and the other ends (heads) will become North poles. Since the heads of the two pins are now both North poles and are close to each other, they will exert a repulsive force on each other. This repulsion causes the pins to push away from each other and hang at an angle, rather than straight down.