A counterfactual conditional (sometimes called a subjunctive conditional) is a logical conditional statement whose antecedent is (ordinarily) taken to be contrary to fact by those who utter it. Contrast the following statements:
(1) If Keith didn't touch the hot stove, then it didn't burn him.
(2) If Keith hadn't touched the hot stove, it wouldn't have burned him.
Someone uttering (1) would not ordinarily take "Keith didn't touch the hot stove" to be false, but someone uttering (2) would.
Counterfactual conditionals cannot be modeled using the material conditional, because any material conditional with a false antecedent is automatically true. For example,
(3) If the Nazis had won WWII, the world would not have become a very different place.
would be modeled with the material conditional as
(4) The Nazis won WWII -> The world did not become a very different place.
where -> represents the material conditional. (4) is true (by the truth table for ->), while (3) is clearly false. Because of this problem (and others like it), philosophers such as David Lewis and Robert Stalnaker have tried to devise ways of formally modelling counterfactuals using the possible world semantics of modal logic. Essentially, one can define a symbol -> so that:
(5) A -> B is true at a world w if, in all the worlds closest to w where A is true, B is also true.
(6) If the braves had won, Keaton would've eaten his hat.
To evaluate (6), consider a possible world where the braves did win, and imagine that this world is otherwise as similar to the actual world as possible (so, for example, it is not a world ruled by Nazis). Then ask whether, in such a world, Keaton proceeded to eat his hat.
See also: counterfactual history
Classically, an important work on counterfactuals is
Counterfactuals, by David Lewis, 1973 (Blackwell Publishers)
For a good introduction, see the chapter on counterfactuals in the excellent
Deduction, Introductory Symbolic Logic, 2nd edition, by Daniel Bonevac, 2003 (Blackwell Publishers).
For a very well written philosophical discussion of conditionals, see
A Philosophical Guide to Conditionals, by Jonathan Bennett, 2003 (Oxford).