A dissertation is a book-length work prepared by a graduate student as a requirement for a doctoral degree (usually a Ph.D.)
A thesis is an in-depth essay prepared by a student as part of the requirements for a master's degree (usually M.A.) or for an undergraduate degree.