Getting started with Compiler Design
Alex Aiken's Coursera course on compilers is very nice. I suggest to take it
and do all exercises. Another interesting looking online course can be found here, although I have not checked it out in detail (I would be interested in opinions about it).

As to books, here are a couple.


Modern Compiler Implementation in Java (second edition) by Andrew
Appel and Jens Palsberg.
Engineering a Compiler, by Keith Cooper, Linda Torczon.
Basics of Compiler Design by Torben Mogensen. It's free.