The interpretation of this sentence means I am asking, How do you learn Chinese? But it could also be interpreted as me asking why you learn Chinese, right? So, how do I use 怎么 correctly?
True. I guess it’s like “Why did you learn Chinese” vs. “How did you come to learn Chinese”. Both mean the same thing, but one is asked with “why” and the other with “how”.
I didn’t see that Tempogain had already said this above.
Probably means how did you learn / are learning chinese. Why would be a more specific ‘ni wei semma yao xue zOng wen’ (I used Taiwan accent pinyin for the laughs)
While colloquially both meanings are possible, to say Why did you learn Chinese, in addition to the 為什麼 approach, when sticking to using 怎麼, you would usually add 會, to form 你怎麼會學北京話.
Just saw @hannes already made the same clarification.