Any good opponent should see a discovery coming, but even if he does, you can often use the threat of a discovery to force him to make a move he might not have spent time on. Generally, it is best to set up a discovery by moving the blocking piece into place first, and then the "discovered attacker" in afterwards. Another opportunity to set up a discovery is when you know an exchange of pieces is going to be taking place.
As with other tactics, just because a discovery can be dangerous doesn't mean it always is. If you see one coming against you, don't immediately panic. Make sure there is actually some poison in the move before deciding you have to react to it.