Like is a preposition and is followed by a noun, a pronoun or a gerund: He is just like his brother. It felt like being home again.
As is a conjunction and is followed by a verb or by a clause: I want to be able to dance sevillanas well, as you do. I would like to go on a round-the-world trip, as my uncle did.
In some cases, as is used for the real case and like is used for an unreal comparison: My sister works as a shopkeeper. She gets up at 6 am every day and works till 9 pm. She works like a slave!
While studying for his finals, Tommy smoked _____ a chimney, and, _____ one would expect, he developed a nasty cough and slept very badly. But he worked _____ a demon for the first time in his life (_____ many other students) and passed his exams with flying colours. When he heard the good news, he danced round in delight _____ would a happy child, and decided to give up smoking. _____ soon _____ he did so, his cough disappeared and he slept _____ a log. Now he has the occasional cigarette, but he never smokes _____ much _____ he did _____ a student, and he feels _____ fit _____ a fiddle!