A: 어떻게 하는거야?
How do you do it?
B: 이렇게 하는거야.
it works like this. / This is how it's done / This is the way it goes.
V + -는 거야 used for explaining the action about which the listener has some information.
V + -고 있어/다 used for explaining the action about which the listener has no information.
Q: 지금 뭐 하는 거야? : What is that you are doing now? (The speaker saw some actions or heard some noises.)
A: 책 읽는 거야. : What I'm doing now is reading a book.
Q: 지금 뭐 하고 있어?/지금 뭐 해? : What are doing now? (The speaker has no information)
A: 책 읽고 있어/ 책 읽어. : I'm reading a book.