어떻게(adverb) means ‘how’ and ‘해요(verb)‘ means ‘do’, so 어떻게 해요 means ‘what should I(you) do?”. And 어떡해요(adjective) is a short form for 어떻게 해요. Therefore, both mean “what should I do?”. They are used for when some BAD thing happened.
In conversations, it can be translated “Oh, no”, “Oh, my god!” or “Too bad”. I heard that a lot of people say ‘미안해요’ when they hear bad news because in English, they say “I am sorry to hear that.” when they hear a bad thing.
But “미안해요.” means “sorry/apologize”, not ‘feel sorry’. You can say “아이고, 어떡해요.” or “어머, 정말 안 됐네요.(It is too bad)”.
A: 200만원을 잃어버렸어요. I lost 2,000,000 Won.
B: 아이고, 어떡해요. 그거 등록금이잖아요. Oh, my god! That was your tuition!
B: 왜 울고 있어요? 무슨 일 있어요? Why are you crying? What happened?
A: 어제 우리 집 강아지가 갑자기 죽었어요. My dog suddenly died yesterday.
B: 어머, 어떡해요… 무슨 병이 있었어요? Oh, no… Was he sick before?
A: 지난 주에 정민 씨가 남자 친구하고 헤어졌어요. Jungmin broke up with her boyfriend last week.
B: 어머, 정말 안 됐네요. 정민 씨가 남자 친구를 많이 좋아했잖아요. That’s too bad, Jungmin really like him, right?