Hanged means “executed by hanging.” Some authorities accept hung.
Hung means “suspended” otherwise.
Both are past tenses or past participles of the verb to hang, but each applies to specific cases.
Examples: The five plotters in the Lincoln assassination were hanged.
We hung the towels out on the clothesline to dry.