Grammatical gender is a way of organizing words in a language. Gender is a way of deciding what inflection, or change in form, a word will have. Some languages have grammatical gender, like Spanish and Arabic, others do not, like Chinese, Japanese, and Estonian.
Proto-Indo-European, the supposed ancestor language of Indo-European languages, had three genders, masculine (male), feminine (female), and neuter (neutral). A word's gender decides how to say a word. For example, in German the word for man is masculine (der Mann), the word for woman is feminine (die Frau), and the word for girl is neuter (das Mädchen). The gender of a word may not have connection with its biological sex in certain languages, but it is instead a way to organize words grammatically. Many Indo-European languages, like Russian, German, and Latin, still have all three genders.
Some Indo-European languages lost the neuter gender and have either replaced it or completely got rid of it. In French, all singular nouns are either masculine (like in the boy "le garçon") or feminine (like in the girl "la fille"), but all plural nouns use the plural gender (like in the boys "les garçons" and the girls "les filles").
In Spanish, there are only masculine and feminine words, but gender in nouns are usually marked by a vowel at or near the end. Most masculine nouns end with the vowel "-o" and most feminine nouns end with the vowel "-a". For animate (living) nouns, the gender of the noun will always be connected to its biological gender. For example, a male dog is "perro" and a female dog is "perra". If the gender is unknown, the noun will automatically be masculine. In plural forms, if at least one of the nouns is male, then the plural noun must be masculine, even if the majority are females, like in the friends "los amigos". However, if all of the members of a plural noun are female, then the plural noun is feminine, as in "las amigas".
While English has three genders, most nouns are not marked by gender. However, the genders of pronouns must match the biological sex of animate nouns. Males must be masculine and females must be feminine. All plural and inanimate (non-living) nouns must be neuter. Some linguists call English's gender system natural gender.
In Chinese, words have no grammatical gender, but there are still three gendered pronouns. The masculine pronoun is written as 他, the feminine is 她, and the neuter is 它. Even though all three are written in a different Chinese character, they are all still pronounced exactly the same, pronounced "tā" in Mandarin. This is why many Chinese learners of English do not use English pronouns correctly. In some contexts, if the gender is unknown, the pronoun will be written in pinyin as "Ta", even if the rest of the document is written in Chinese characters.
In Japanese, grammatical gender is not used, since people are usually referred to by name and/or title rather than a pronoun. However, men and women are expected to use different pronouns. For example, women are supposed to say "watakushi", "watashi", or "atashi" when speaking in first-person, but men usually say "watashi" when speaking politely and "boku" or "ore" when speaking plainly.