"noun A のような noun B" means "a B like/similar to A." When you say "A のような B," the A either has the same quality or appearance as B, or is an example of B.
I like towns like Kamakura.
You use "noun A のように" when you want to describe an action which is "done in the same way as A" or a "characteristic which is comparable to A."
Mary can swim very well, just like a fish.