What's the difference between the main types of logic? I've heard of all sorts of logic: Mathematical logic, propositional logic, first order logic, second order logic, predicate logic, Boolean logic / algebra, etc.
What are the main differences between these categories and how do I know what to apply when? 
 A: To give a very good answer would require probably to read a good book in mathematical logic.
Nevertheless here is a very short, and possibly rough, description of the terms you asked for. Be careful, what follows is a very imprecise description of the various kind of logic, but again I think this is the best one can get in the limit of a post (or at least, that is the best I can think of).
Mathematical logic denote that branch of mathematics that applies the technique of mathematics to the study of logics. It basically provides formal ways to define what a logical system is and how to prove stuff about these systems.
Propositional, first-order and second order logics are just few examples of these formal logical systems.
The differences in these systems are in the expressiveness of the said systems. 
For instance in propositional logic one deals only with true-or-false statements while in first-order logic one can use formulas which states that certain relations hold for some objects or for all the objects.
In second-order logic we can start to state that relations between relations hold for certain relations or for all the possible relations, something which cannot be done in first-order logic.
The term Boolean logic is usually used a synonym for propositional logic.
Boolean algebra is a term used for denote a certain class of algebraic structure which captures the algebraic properties of propositional logic.
Edit: by the way if you look at wikipedia's article you can find lots of informations on the subjects.
Edit 2: the OP asked in the comments below for an example of second order sentence, here is an informal example.
In what follow I will use the following notation: 
$P x$ will mean $x$ satisfies the property (unary relation) $P$ and $x R y$ will mean $x$ is in the relation $R$ with $y$.
For every binary relation $R$ such that 


*

*for all $x$ we have that $x R x$ 

*forall $x$ and $y$ if $x R y$ and $y R x$ then $x=y$

*forall $x$, $y$ and $z$ if $x R y$ and $y R z$ then $x R z$

*forall properties $P$ such that exists at least an $x$ for which $P x$ there is a $m$ such that $P m$ holds and for every other $x$ for which $Px$ holds we have $m R x$


we have that forall $x$ and $y$ either $x R y$ or $y R x$.
This apparently complex statement is basically saying that every order $R$ which is wellorder, i.e. an order such that any satisfied property $P$ has a minimal element that satisfies it, is a total order.
