This page of the game guide to Borderlands 2 will inform you about the Badass Ranks challenges, which you can attempt to beat while playing through the game. Completing challenges is rewarded by the game.
In return for completing given challenges, your Badass rank will increase. The challenges are divided into categories, in which you advance onto further level (with a maximum of five). Generally there's an easy rule: the higher the level, the harder it is to complete it.
After obtaining a proper Badass rank, you will receive a Token which you can spend on one of five random improvements (Redeem Token). They permanently influence your statistics, for example by improving your health or damage.