http://mason.gmu.edu/~sfiorito/eXPinstall.htm <– this is a great page for instructions on installing XP onto compact flash.
The above page has disappeared from the face of the internets. Try http://www.tvharmony.com/blog/archives/2004/12/booting_windows_1.html instead.
http://blogs.msdn.com/embedded/archive/2005/03/20/399535.aspx <– this page has some interesting comments about this too.
http://www.litepc.com/ is a commercial product that helps strip down an XP install to 350MB
There is an excellent (albiet a little old) forum post here that describes how to slim down the install cd.
To remove components already installed, see the Microsoft article here.