They are not all exactly the same, and they are used in different contexts.
1) "하면서" = while doing one thing...doing something else (i.e., simultaneously)
공부를하면서나는또한 놀수있다 = I can play while I am also studying
2) "동안" = while one event was happening, another unrelated event happened
내가집에없는동안 내개를훔쳤다 = While I was not not, my dog was stolen
3) "때" = refers to an occasion when something happened, or during some stage of time (e.g., "during my youth", "while my mother was still alive, "when my team won", etc.)
그때 내가이겼을때, 그는나에게 화를냈다 = That time, when I won, he got mad at me.
In the last example, "때" is repeated because literally, it says, "that time, the time when I won, he got mad at me".