You na/you ni are translated as "like" or "similar to". The you na is used to describe other nouns as said. You ni can be used to describe either actions or nouns. 天使のような人でした but you can also say 天使のように見えた and both still refer to 天使。 The first one is "(he/she)was an angel-like person" and the second one is "(he/she) looked as if they were an angel". So you na describes how a noun was like another noun in some way, whereas you ni describes how someone/something performed an action in a special way.
You na: "noun-like noun" and you ni: "verbs/verbed like a noun".
You ni can also be used to express hope or wishes: "テストが上手くいくように" or "in order to, so that": テストが上手くいくようにがんばります。