[noun] + みたいに [noun] + みたいな + [noun]
[verb (plain)] + みたいに [verb (plain)] + みたいな + [noun]
[i-adj] + みたいに [i-adj] + みたいな + [noun]
[na-adj] + みたいに [na-adj] + みたいな + [noun]
みたいに modifies verbs/adjectives (adverbial); みたいな modifies nouns (adjectival)
みたいに and みたいな are used to express that something is "like" or "similar to" something else. They attach to nouns, verbs (plain form), and adjectives to draw comparisons or describe resemblance.
みたいに functions adverbially – it modifies verbs and describes how something is done.
みたいな functions adjectivally – it modifies nouns and describes what kind of thing something is.
Noun + みたいに / みたいな:
Verb (plain form) + みたいに / みたいな:
い-adjective + みたいに / みたいな:
At the end of a sentence, みたいだ (or polite みたいです) can express resemblance or conjecture ("it seems like").
The conjecture usage ("it seems") is a separate grammar point.