Funny question. It's a dirty word as well as a cool word in slang.
It's often used by men, seldom for ladies.
It means someone is so awesome and cool after doing sth amazing or out of others expectation.
Such as: The football player kicked 3 goals in first half of the match, 太牛B了!
(to be polite, you could eliminate 'B', and just say: 太牛了!or 太牛X (牛叉)了!
Such as: Tom played a practical jokes with the English teacher on class, he was so NB!
It's as popular as SB=傻B(sha)=傻逼 but I suggest you never use it.