How can I tell what secrets are before triggering them?
In Hearthstone, how can I tell what secrets are before triggering them?
Obviously it is not possible to tell with 100% certainty at all times what a secret is without playing any cards or taking any actions, but what sources of information are available that can help me deduce which secret it probably is, and are there any specific rules that I can use to narrow it down depending on the class of the opponent?
The only way to know a secret is, is to reveal it or through process of elimination figure out what it is not. There is only 1 card currently to negate secrets, Flare.
In order to use process of elimination you need to know what secrets are out there. Each class has a fixed cost for their secrets, so that will give you no information regarding what it is. The other thing to take into account is the game format and the regularity with which each secret could be expected.
If you are playing Constructed in "Play" mode and your opponent uses 1-2 legendaries on you, it is safe to expect they have access to the rare and epic traps; but if they are playing primarily the basic cards it is more likely they may not have the rarer secrets.
If you are playing Arena, there are certain secrets you see more often than others. For example, most players rate Explosive Trap fairly highly as a Hunter and it is a common.
That said, there is also some basic logic you should use when testing a trap. If you are attacking a hunter, be intentional about which creature you attack with (knowing that the trap could be a freezing trap), this can sometimes be used to your benefit. If the trap does not trigger when you attack, then it is not Misdirection, Freezing, Explosive, or Snake... leaving only Snipe. So then be intentional about which creature you play next. Also, you would want to attack before you play a creature in almost every scenario because of the high probability of Explosive Trap or Misdirection.
3 classes have secrets; Hunter, Mage, & Paladin.
Hunter:
Snake Trap (epic) - trigger: attacking minion, effect: summon 3 1/1 snakes (beasts).
Explosive Trap (common) - trigger: attacking player, effect: deal 2 damage to all enemy Characters (includes you).
Freezing Trap (common) - trigger: any minion attacking, effect: return minion to hand & it costs +2 to play.
Snipe (common) - trigger: "Play" a minion (not "Summon", so for example it does not trigger from paladin/shaman abilities or imp master), effect: deal 4 damage to that minion.
Misdirection (rare) - trigger: When any character attacks a hero, instead he attacks another random character.
Mage:
Ice Block (epic) - trigger: mage takes fatal damage, effect: mage doesn't die this turn, stays at 1 life.
Spellbender (epic) - trigger: target any minion with a spell, effect: randomly select a new target.
Counterspell (rare) - trigger: cast any spell, effect: that spell is countered.
Vaporize (rare) - trigger: attacking player with minion, effect: destroy that minion.
Ice Barrier (common)- trigger: attacking player, effect: mage gains 8 armor.
Mirror Entity (common)- trigger: "Play" a minion, effect: summon a copy (battlecry abilities do not trigger for mage's copy).
Duplicate (common - Naxxramas) - trigger: friendly minion dies, effect: Place 2 copies of destroyed minion in hand
Paladin:
Eye for an Eye (common) - trigger: paladin takes damage, effect: after paladin takes damage the same amount is done to his opponent.
Noble Sacrifice (common) - trigger: attacking anything, effect: paladin summons a 2/1 and your attack is redirected to that.
Redemption (common) - trigger: any of paladin's minions die, effect: return to life with 1 health.
Repentance (common) - trigger: you play a creature, effect: it's health is reduced to 1.
Avenge (common - Naxxramas) - trigger: friendly minion dies, effect: give a random friendly minion +3/+2
Deducing by elimination (as described in other answers) is the usual way. However, if you happen to be running Kezan Mystic in your deck, you can just take their secret and know for sure!
You can't know exactly what the secret is before triggering it.
The best you can do is to learn the cards available to each class, and try to determine what sort of deck your opponent has built. There are a set number of secret cards available for each class, so as long as you know what those are you can take your best guess as to which one was just played and act accordingly.