Well, it’s very simple. You learn it. Just memorize it, like you used to do with your English or French vocabulary at school.
However, Chinese is a lot more challenging due to the characters. How do you look up characters in a dictionary for example? This used to be very difficult as there are many ways of ordering characters. But know there is help – technology!