Yes and no. Everything you see around you (every living species) is the result of millions upon millions of years of mutations. Mutations are completely random and have zero to do with the environment (barring radiation, etc). However, sometimes the mutation is beneficial in relation to its environment and allows an organism to produce more offspring to reproduction age than its competitors. The adaptation is pure chance but is happily taken advantage of. There are many mutations present that go unnoticed that are neither beneficial nor harmful.
A good example is the finches in the Galapagos island. If we take the finch with a thicker beak (good for cracking seeds) it was a mutation that originally gave it the thicker beak. It found a new food source (seeds) and was able to reproduce offspring with thicker beaks. The offspring with even thicker beaks were able to eat even more and thus grow quicker and reproduce earlier and more often and so on and so on, skewing the population towards thicker beaks. The thicker beak is now being positively selected for but it's initial introduction came from a mutation.
On re-reading, I apologize if I'm being too long winded. I occasionally instruct science and sometimes have trouble letting go when I get home.