"Excuse me, where is the supermarket?"
‘超市在哪里？’ literally translates to 'supermarket is at where?' '哪里在超市？‘ literally translates to 'where is at supermarket?'
As you can see, the second sentence has a problem due to the ‘在’ meaning 'is at', so it makes no sense. The correct translation is the first one — ’超市在哪里‘.