Gender-neutral language and the singular they
The UOC recommends using gender-neutral language. For example, to refer to a person whose gender is unknown to you or not of concern, you can use the pronoun they (or its inflected forms their, them and themselves/themself):
Each student must submit their paper by midnight on 30 June.
This contrasts with use of the masculine forms he, him, his and himself in circumstances such as these. In the 19th and 20th centuries many grammarians prescribed this approach but nowadays it is recommended less often:
Each student must submit his paper by midnight on 30 June.
There are differences of opinion regarding the approaches described above. The view from the UOC Language Service is that arguments in favour of the so-called singular they (for example those provided by Purdue OWL or the Oxford English Dictionary) outweigh arguments against it (for example this opinion piece published by The Atlantic).
If you feel unsure about which third-person singular pronoun to use, bear in mind that it may be possible to avoid the third-person singular altogether. By making the entire sentence plural our example becomes:
All students must submit their papers by midnight on 30 June.
Another option is to omit reference any person at all, particularly when it would not add information that cannot be otherwise inferred. For example:
Papers must be submitted by midnight on 30 June.
When the sentence in question provides instructions, you may also consider using the gender-neutral you or an imperative formulation. Examples:
You should submit your paper by midnight on 30 June.
Submit your paper by midnight on 30 June.
Finally, on rare occasions, constructions such as he/she, s/he or he or she (or the corresponding inflected forms) might be used, thus giving, for example:
Each student must submit his or her paper by midnight on 30 June.
Bear in mind, however, that these types of construction are non-inclusive towards people whose gender identity is non-binary and their repetition can make a text sound stilted. It is therefore best to avoid using them.