What does it mean to work under a W2 contract as opposed to 1099?

In my job search, I am seeing a lot of references to W2 contracts and 1099 contracts. I assume W2 means working for a contracting company and 1099 is as an independent contractor, but I am not real sure. Could someone explain the differences?