Slang. When one male makes it difficult for another male to get to know a certain female for the purposes of sexual relations, this is known as cockblocking. The allusion here should be fairly obvious.
One who engages in cockblocking can be a "friend" of the female's, or just some guy in the club/party making it more difficult for the one being cockblocked to engage in sexual relations with the female in question. One cannot be cockblocked by a boyfriend or someone who is otherwise romantically involved with the female in question, though someone may cockblock you to "save" the female from cheating on her significant other, who is not present.