Word order is part of syntax, which is part of grammar. Word order may be different in different languages. For example, English "I play tennis only sometimes" would be in German Ich spiele nur manchmal Tennis, literally "I play only sometimes tennis". In Norwegian, the same sentence would be Jeg spiller bare tennis noen ganger ("I play tennis only sometimes").
In Portuguese, the sentence could be Eu só jogo tênis algumas vezes ("I only play tennis sometimes), but word order can be changed to Eu jogo tênis só algumas vezes ("I play tennis only sometimes"). However, Eu jogo só tênis algumas vezes is not allowed ("I play only tennis sometimes") because the meaning would be changed.
In English, a simple sentence with a verb (an action), subject (who or what is doing the action), and an object (to whom or what the action is done) is written with a subject-verb-object word order (SVO). For example, in the sentence "Robert opens the door", "Robert" is the subject, "opens" is the verb and "door" is the object. SVO is the second-most common word order among all languages and is used in 42% of them. Examples are Mandarin Chinese, Bahasa Melayu, Bahasa Indonesia, Spanish, French, Italian, Thai and Vietnamese. While some of the above languages can use other word orders, such as SOV and VSO, they use SVO for the simplest sentences.
In other languages, sentences can use other word orders. Consider Robert opens the door. In English, changing the word order to "The door opens Robert" would change the meaning of the sentence. In Latin, however, Robertus ianuam aperit and ianuam Robertus aperit mean the same. Ianuam is in the accusative case and so it is the direct object and Robertus the subject. Changing the cases of the words, however, to Robertem ianua aperit would change the meaning of the sentence: ianua is now in the nominative case and so it is the subject and Robertum the object.
The subject-object-verb (SOV) word order is the one that is used by the greatest number of distinct languages, 45% of them. It is especially common in the theoretical language family that is known as the Altaic language family, which includes many languages such as Japanese, Korean, Mongolian and the Turkic languages.
In Japanese, for example, a simple sentence uses SOV. In other words, the sentence "Robert opens the door" becomes "Robert the door opens". Such languages often use postpositions, which act like prepositions but appear after content words rather than before them, to show the role of a word in the sentence. The sample sentence "Robert opens the door" would be in Japanese ロバートはドアを開ける Robāto-wa doa-o akeru in which は wa as in ロバートは Robāto-wa shows that ロバート Robāto (Robert) is the topic of the sentence, and を o as in ドアを doa-o shows that ドア doa is the direct object of the sentence. Around 45% of all languages are SOV languages.
The verb-subject-object (VSO) word order is the third-most common word order in world languages. There are far fewer VSO languages than SVO and SOV languages, and only 9% of them are VSO. Language groups in which VSO is common include Afroasiatic languages, such as Arabic, Hebrew and Aramaic, and Celtic languages, such as Irish, Welsh and Cornish. In VSO languages, "Robert opens the door" would be "Opens Robert the door". Spanish sentences are usually SVO, but VSO is also common. In Spanish, the example above can be as Roberto abre la puerta (Robert opens the door) or Abre Roberto la puerta (Opens Robert the door).
Aside from SVO, SOV, and VSO, other kinds of word orders are rather uncommon. VOS word order makes up at around 3% of all languages, and languages that begin with the object (OVS and OSV) are extremely few, each around 1-0% percent each.