The basics are:

Look at the simple form of the noun (sing., Nominative case).
masculine -> if it ends in a hard consonant, or “й” (Eg.: рот, стол, прибой)
feminine -> if it ends in “а” or “я”...