well... eeuhm
if I want to ask "how did you do that?", can I say "anata wa are/sore suru, nanda?" (at least, if that question is correct japanese)
OK, I see.
First of all, you need to understand that English and Japanese are two, very different languages, and that translating word by word often does not work at all.
In English "how did you do that"
how : interrogative (= question word) asking the way/manner something is done or happens
did you do : basic structure is subject + verb (you do) and to make it into interrogative (question), you should place a auxiliary verb (helping verb) in front of the S + V.
Here it is "did" which is a past form because this sentence is asking about the past.
that: object of the verb "do".
Now, Japanese language has a very different structure.
"how" the word to ask the way/manner, is "dou" "donoyouni"
"did you do that" is a questioning form of "you did that".
you did that : anata wa sore wo shimashita
anata: you (pronoun for the 2nd person)
wa: particle to indicate the topic (usually called "topic marker"), it will be easier for you to understand if you translate it as "as for..."
sore: that
wo: particle to indicate the object
shmashita: past form of the verb "shimasu" meaning "do"
Now you convert it to a question - in case of Japanese language, there's no need to use auxiliary verb - you just add "ka" to make it a question.
So it is: "anata wa sore wo shimashita ka?"
To add interrogative "how" is very easy.
Just place the word "dou" or "donoyouni".
Since "anata wa" is the topic of this sentence, you usually put "dou/donoyouni" after that.
"anata wa dou/donoyouni sore wo shimashita ka?"
This is the basic.
Now, Japanese language tend to omit something obvious for both the speaker and whom he/she is talking to.
It should be clear who is being talked about if the sentence is made in the middle of the conversation, so you can omit "you" part.
"(anata wa) dou/donoyouni sore wo shimashita ka?"
"that" can be also omitted as it should be obvious for both the speaker and listener:
"(anata wa) dou/donoyouni (sore wo) shimashita ka?"
I hope the above explanation make it a bit clearer.
What I'd recommend you is instead of trying to translate word, learn the basic sentence structure first, then try to compose a sentence to express what you want to say.
Some learning sources for learning Japanese online:
Teach Yourself Japanese
Japanese Grammar Guide | Learn Japanese
Japanese grammar - Wikipedia
It would be even better to get a book on Japanese language.
Your Japanese study books. | Japan Forum
This thread is discussion about the text for learning Japanese, it might be helpful for you.
Edit: oops, did not notice Mikawa Ossan's post of good examples.
Douyatte is another good alternative for "how".
