The short answer you need to have a musical work available to the masses in some fashion ie a cd for sale, a single, a jingle something on radio whatever. Then you register your publishing co with ascap or bmi or one of those performing rights companies ect.
The why you need it is more complicated search the net for answers and im sure there is more info in this forum and every other hip hop one online look for the info