Cockney is a dialect of British English. Although it originated in London, it’s generally associated with the working class on the outskirts of the city. The pronunciation and rhyming slang make it an interesting dialect, but difficult to understand.
“True" Cockney is associated with those living in the east end of London. People outside the region might have a Cockney accent or understand Cockney insults, but their version of Cockney may not be considered true Cockney.
An interesting rule of Cockney is that an individual must be born within hearing distance of the bells of Saint Mary-le-Bow to be considered a true "Cockney.” If you’re new to the dialect, you’ll certainly need a Cockney translator in the early days. Here are some wonderful resources.