sudo apt-get install debconf-doc debconf-utils
man 7 debconf
Appendix B. Automating the installation using preseeding
http://www.debian.org/releases/squeeze/example-preseed.txt