Let's say your normal game is 0.50/1, and you buy in for 100 each time you play these stakes.
If your poker
bankroll is 2000, then you have 2000/100 = 20 buyins for this game. In order to go bankrupt, you would have to have 20 losing sessions in a row.
So that's a 20x bankroll. A 40x bankroll would be 4000, and now you can withstand 40 losing sessions in a row without going broke.
The number you choose for the "x" is up to you. 10x is for players who enjoy gambling. 100x is for players who are very conservative with their money. Most players will fall somewhere between these two extremes.
So what happens when you are a winning player? You begin with, say, 20x, and as you win, your bankroll goes up. Let's say you increase your 2000 bankroll to 4000, so now you have 40x. What you could do is move up one level to the 1/2 game with a 200 buyin. Now you're back to 20x again, do you understand? This is how you move up - win enough at one level so that your new level is the same "x" as the previous level. If you follow this method - and most importantly, if you are actually a winning player at your chosen level - then you should never go broke. Best wishes!