Originally a racial slur, the term "nigga" ,branched off from nigger or negro, has become a way too address another person as a nickname from a black person. It can substitute "dude" or "man" in casual sentence to a homeboy.
Jamal: Ayo, what's good my nigga?
Demetrius: Nothin' my nigga!