Yes, "SOFT" (Mari, Shrooms, etc.) drugs are legal in small quantities, and should be bought AT A COFFEE SHOP, NOT on the STREET!
In the Netherlands there’s a distinction made between so-called soft drugs and hard drugs. Hard drugs are Cocaine and Heroin, LSD, Ecstasy etc., soft drugs are basically marijuana, hash and mushrooms. While possession and use of the hard drugs maybe tolerated compared to the U.S. they are quite illegal and not condoned socially or by the police. Don't be the tourist arrested for buying illegal drugs on the street. Even with the soft drugs there are strict rules concerning possession and marketing.
Buying drugs on the street is about the biggest tourist trap in Amsterdam. From the first step out of the central station you will be offered drugs. Most of the time these offers will be in the form of a sort of whisper as you walk by a street dealer. They will say under their breath, "ecstasy - cocaine." Simply keep walking or shake you head from side to side. No reason to even speak. Whatever you do don’t buy it, the stuff you get offered can contain anything from vitamin C to washing powder or rat poison. Also often the customer gets robbed or harassed. Again, don't buy drugs on the streets, there are other places where it's safer to buy.
If you’re 18 or older you can visit a coffee shop, or in the case of mushrooms a "smartshop" to buy a small amount of soft drugs for your own personal use (you may buy max 5 grams, and you may posses 30 grams max). You’re not allowed to enter if you’re under aged. Here, the people behind the bar can give you advice and answer your questions. Don’t feel ashamed to ask them. Here you can also experiment a little. Most people aren't offended by smoking cannabis, but you should be reasonable when smoking. This means that unless you are in a coffee shop, ask before you light up. When you are in a public place, especially where there are older people and / or children, leave it out.