As' means in a particular role, capacity and function, whereas 'like' means similar to. Compare these two sentences:
A. He worked as a waiter.
B. He worked like a slave.
Clearly, in A, the man was actually a waiter at the time - that was his job/ role. In B, be wasn't literally a slave. If you work 'like' a slave, it means 'similar to' ie he worked extremely hard.
or
A. John swam like a fish.
B. John went to Colombia as a tourist.
Obviously, John wasn't really a fish - this is just an expression to say that he swam well. But in B, John really was a tourist.
2. When you are comparing two things using adjectives or adverbs, you always use 'as'
John isn't as old as his sister.
This car goes as fast as the other one.
You never use 'like' to compare in this way.
'Like' and 'as' also have a lot of other meanings and uses in English, but these are the main situations where learners get confused. I hope this helps.