[noun] + みたいに + [verb] [noun] + みたいな + [noun] [verb (plain)] + みたいに + [verb] [verb (plain)] + みたいな + [noun]
みたいに and みたいな mean "like", "as if". みたいに goes before a verb or adjective and says how something is done; みたいな goes before a noun and says what kind of thing it is. Both follow a noun directly, or a verb in the plain form, and both are conversational.
After a verb, the picture is "as if": what is going on looks like something that isn't.
みたいな also gives an example of a kind: "something like", "such as". It is not a comparison here; the thing named is one of the kind.