The Cubans who work in a cigar factory can smoke as much cigars as they want, but they can not take cigars with them outside the factory.
So if you decide to buy a cigar on the street, be careful and make sure that you buy the good ones.
You shall not be the first person who buys crap and regrets it afterwards. If you want to buy the real ones or buy them at the factory stores or in the airport. The only other way that I can recommend is buying them with the help of a Cuban friend that you know and trust. We did this and had good quality cigars.
There are lots of guys called Jinateros (scammers) and no likes them. Plus they scam you from time to time. Just be cautious when guys approach you offering a restaurant they know in someone's house or something they can get you- it doesn't always turn out to be legit.
Sometimes they come on horseback like these guys in the photo.