North Korea has threatened retaliation over joint military exercises that troops from South Korea and the US are taking part in.