[praise] → 哪里哪里
[praise / thanks / apology] → 哪儿的话 / 哪里的话
哪里哪里 is the modest answer to a compliment: "oh, not really", "you're too kind". 哪里 means "where", and the reply works like asking where the praise could have come from. It is said twice.
It is polite but a little old-fashioned. Younger speakers often say 过奖了 "you flatter me", or simply 谢谢.
哪儿的话 (or 哪里的话) means "what are you saying" – nothing to praise, thank or apologise for. It covers more ground than 哪里哪里, and often leads into a reason.
哪里哪里 answers praise only. To a thank-you, use 不客气 or 哪儿的话.
A single 哪里 in reply to praise reads as a question, "where?". Say it twice.