Cabrón (lit.: "big goat" or "stubborn goat") is used in Spain, Mexico, Cuba and Puerto Rico, as a generic insult. An old usage is similar to that of "pendejo", namely, to imply that the subject is stubborn or in denial about being cheated, hence the man has "horns" like a goat (extremely insulting).
The expression ¡Ah cabrón! is used sometimes when one is shocked/surprised by something. Among close friends, the term is often inoffensive; however, it is not a word to be used casually with strangers.
As an adjective it is equivalent to "tough" as "It is tough" (Está cabrón).
To some extent, it can also be used with an ironically positive connotatin meaning great, amazing, phenomenal, or bad-ass. Such expressions would be said as: ¡Estás cabrón! or ¡Yo soy cabrón!. The word is quite flexibly used in Puerto Rico, and it can even have completely opposite meanings depending on the context. Best friends call each other "cabrón" in a friendly manner, while it may also be used in an offensive manner. One might say, "Esta cabrón" to describe something as very good or very bad depending on the circumstance.
In Panama, it is used as an adjective to mean something/someone very annoying (that pisses you off). The verb cabrear can mean "to piss off (someone)."
In Peru, cabro is a reference to a homosexual, hence cabrón is a superlative form ("big faggot"/"flaming faggot").
The term cabrón also means a handler of prostitutes, comparable to "pimp" in English. The most common way to refer to a pimp is Spanish is by using the term chulo as a noun. In some countries chulo can be used as an adjective somewhat equivalent to "cool" (Ese hombre es un chulo = "That man is a pimp" versus Ese libro es chulo = "That book is cool"). The word chula is a completely benign reference to an adorable female or feminine object, as in "¡Ay, que chula!"