like; similar to — used to indicate resemblance (e.g. 'X is like Y')
子どものように無邪気に笑った。
He/She laughed with the innocence of a child.
彼は先生のように落ち着いて話す。
He speaks calmly, like a teacher.
この布は絹のように柔らかい。
This fabric is soft like silk.
as with; in the same way — used to indicate that something should be done or occurs in the same manner as something else
去年のように、今年も桜祭りは中止になった。
As with last year, the cherry-blossom festival was cancelled this year too.
先生の言ったのように問題を解いてみてください。
Please try to solve the problem in the way the teacher described.