Just like in English, there are specific question words in Japanese. Let's go over some of the Japanese question words, and use them in some sentences:
なん/なに (nan/nani) what
Both なん (nan) and なに (nani) mean "what" in Japanese. なん is a shortened version of なに, so many times it comes down to preference for use. Let's see both なん (nan) and なに (nani) in sentences:
せんもん は なん です か (senmon wa nan desu ka) What is your major?
なに を よみます か (nani wo yomimasu ka) What are you reading?
Notice that なん (nan) and なに (nani) replace the word that would be our response, thus not making it a yes/no question. When using a question word, its placement depends on where the response word would go in a statement sentence.
Another question word is なんじ (nanji), which means "what time is it?" (notice the なん in なんじ):
いま なんじ です か (ima nanji desu ka) What time is it now?
いま は いちじ です (ima wa ichiji desu) It's one o'clock.
Just like the なん (nan) and なに (nani) sentences, なんじ (nanji) appears in the question where our answer would be. なん (nan) can also be added to make other question words, such as:
なんさい (nansai) How old?
なんねんせい (nannensei) What year (as in school year)?
Remember when using a なん (nan) question word to place it in the question where the answer would logically go.