For all of denim's strength and durability, you can still ruin a great pair of jeans without proper care. Jeans should always be washed in cold water in a gentle cycle. Washing in hot water may result in your jeans shrinking and fading. It's also a good idea to turn your jeans inside-out and use a gentle detergent.
It's also worth mentioning that you should always wash new jeans before wearing them, especially the darker blues. The dye used in jeans is often quite strong and washing will remove the excess dyes. Always wash your jeans for the first time separate from any clothing to avoid the dye bleeding and ruining other clothing.