It is usually used to describe someone. It can be used to offend someone, but more commonly used as friendly banter. It's also used to describe objects in a negative way. There are several direct meanings. Gay, ugly or disgusting are some. Cat is singular and plural. It is unknown where the phrase comes from but it is very modern.