Yes and no. Yes it’s mostly true that you can smoke marijuana but there are restrictions than can make it technically illegal. Coffee shops in Amsterdam do sell marijuana and they will not be closed down as long as they store no more than 500g at one time and as long as they are not growing more than 5 plants.
Also generally speaking, a person can smoke marijuana in public as long as they are not in possession of more than 5g. However, if caught with more than 5g in your possession or if selling to minors you risk being arrested.