Typically there are two types of bankrolls in gambling. The big bankroll is the total money you have to play with, and the small bankroll is what you remove from the big bankroll to play a session. Since poker, unlike all other types of gambling, has positive expected value for the good players, your small bankroll is what you use to build your big bankroll. As your big bankroll increases, so does your small bankroll. In other words, as your big bankroll increases, then the stakes you play can go up (what are called 'levels'), further increasing the size of your big bankroll, until you flatten out or begin losing, in which case you'd have to decrease your small bankroll by moving back down in levels until your small bankroll is again increasing your big bankroll.
Most players play for fun and really don't care whether they win or lose. Many players know they'll lose even before they begin, and don't care. And that's ok. There's nothing wrong with that, since poker can be a fun, stimulating way to spend time. However, if you want to win, then you need the right size bankroll to support the stakes you are playing at, provided you are a winning player, to protect yourself against "gambler's ruin".
Gambler's ruin generally refers to the problem of ever decreasing expected value of a gambler's bank as he continues to gamble. Eventually, as the bank gets smaller, the player will go completely broke. If a player is playing with a negative expected value (-EV), that player will eventually go broke no matter what he does. If the player is only breaking even, that player will eventually go broke no matter what he does, due to the house edge. However, if the player has a positive expected value (+EV), but doesn't have a big enough bankroll for the stakes he is playing, he has a high likelihood of going broke anyway. The only way to protect yourself against going broke, as a winning player, is to have a big enough bankroll to absorb the volatility you will experience.
Being broke in gambling is sometimes called being "stuck". Getting "unstuck" is getting 'out of the hole'. If a poker player with, historically, a –EV continues to play with a –EV at the same stakes (and doesn't adjust his game to improve to a +EV), then the amount of time it will take for him to get "unstuck" is… infinity.
So, while playing poker properly, and having a +EV is paramount, having the proper bankroll to support your play is a huge part of the battle to stay afloat during times when things seem rather random and chaotic. In order to prevent these odd losing streaks from ruining gamblers, most have built-in protection via their bankroll to sustain them during rough stretches. The amount of their bankroll is usually big enough to reduce the likelihood of reaching gambler's ruin, or going broke, to about 3-5%. That's the risk of ruin.
In poker the answer is fairly simple.
Limit Cash Games - If you play limit poker, then you need about 300x the big blind. So you take your bankroll, divide by 300, and then you have the game you can afford to enter. If your bankroll is $600, (600/300=2), then the game you could safely play is $1/$2 limit.
No-Limit (NL) Cash Games – NL cash games can be particularly cruel to your bankroll due to their high volatility, and therefore you need a larger bankroll to play them. You need about 1500-2000x the big blind because no limit cash games has, without a doubt, the highest variance. Someone with a bankroll of $600 could only afford to play at the 15/25cent level in no limit cash games.
For tournaments, you need 30-40x the buy-in for whatever stakes you are playing. If a player has a $600 bankroll and wanted to play tournaments, he could afford to play tournaments with a $15 buy-in. He would need to build his bankroll up to $800 to go up one level to the $20 buy-in, and so on.
Another important bankroll consideration is that if you keep track of your sessions, your bankroll, in the long term, will help expose problems with your game. If you have developed into a winning player but are suddenly losing for long stretches that are mathematically improbable, this should signal to you that you've developed a leak in your game and you need to fix it. Without keeping records of your sessions and monitoring your bankroll and buy-ins you may never realize what is happening until it's too late and you've gone broke.