Sacrifice bid against a high-level contract by the opposition despite some expectation of defeating that contract. Insurance bids are more common at aggregate (rubber) scoring and IMPs than at matchpoints. In the former, you do not want to concede a large score when you might have made a score yourself or conceded a small penalty. At matchpoints, whether you are plus or minus assumes greater importance.
The haphazard nature of the auction means you cannot be sure 6♥ is making. However, you do know that 6♠ doubled is going to be no more than a couple off. At rubber or IMPs, you would take out insurance by bidding 6♠.