よう (na adjective)

  1. Appearance, manner

事故のようです。
It looks like an accident.

お寺のような建物
A building that looks like a temple

Put simply, よう means “appearance”, but as as shown above, when it is modified by [noun]の-, it becomes a な adjective meaning “like (that noun)”.