There are many openings where you fianchetto your Bishop (i.e. you develop your Bishop to g2 for White or to g7 for Black). There your Bishop is going to control the long diagonal and offer an extra protection for your King. But what is that? Your opponent castles the opposite side and starts pushing his 'h' pawn. If you are not aware of the dangers of this plan, then you can be in big trouble very quickly. We discussed the deadly consequences of such an attack here: http://www.chess.com/article/view/edit--deletetypical-patterns-everyone-should-know-the-dangerous-h-file-part-2
In the annotations to his game vs. Larsen, (which was aptly named "Slaying the Dragon" because Black played the Dragon Sicilian), Fischer says that this plan is so simple and efficient that weak chess players beat Grandmasters there and also he found out that out of 10 games played, White wins 9! So, what should Black do? Just abandon the Dragon Sicilian and similar openings where you fianchetto the Bishop? Of course not! You just need to know how to deal with the perfect storm which is brewing.
And the first rule of the Dragon is: you do not talk about the Dragon! Oops, sorry, it sounds good, but that is not the actual rule. The real rule is quite simple and was told to me by my first coach. At that time I was playing the Dragon Sicilian exclusively (it was my only opening as Black for about 7 years!) and just lost a terrible game where my opponent brutally checkmated me using the 'h' file. So, my coach pointed at my Bg7 and said "As long as this guy is alive, you are not going to get checkmated!". Please remember this simple rule whenever you play an opening where you fianchetto your Bishop!
Of course your opponent will try his best to eliminate your Bg7, usually by playing Be3, Qd2 and then Bh6 offering a trade. You can sidestep this trade by playing Re8, so after your opponent plays Bh6 you calmly play Bh8 and your Rf8 is not hanging anymore. But sometimes you can ask yourself: if my fianchettoed Bishop is so important, doesn't it make sense just to sacrifice an exchange to avoid the trade? The first guy who started offering his Rook for the opponent's Bishop on a regular basis was a very talented Soviet GM Vladimir Simagin. Initially the Chess World saw this sacrifice as one of many extravagant Simagin ideas, but later many strong chess players used this sac in their games. Let's look at some of the games where after White played Bh6, Black calmly moved his Bishop to h8 leaving his Rf8 en prise.
In the next game GM Tolush used the same exchange sacrifice to save his fianchettoed Bishop from the trade. It is funny that in the end it was this saved Bishop that delivered checkmate!
In conclusion let me emphasize the fact that the Rooks are stronger than Bishops in the majority of situations and here we are dealing with an exception which works only because both sides castled on opposite sides and attack each other's Kings. But if both opponents castled the same side, then it will be much more difficult for you to make such an exchange sacrifice work. But on the other hand, if your opponent has castled King's side, he cannot conduct the standard attack pushing his 'h' pawn anymore. Therefore your King is safe and you don't need to sacrifice your exchange!
I hope this neat little idea will help you to weather many dangerous attacks. Good luck!