Hola Lynn
There's no way to know the gender of a noun if it is an inanimate noun. There are certain general rules that help, for example, generally, if they end in -o they are masculine, if they end in -a they're feminine, but there are exceptions. We also have specific endings like -dad, -ión, -ud... that are typically feminine nouns. For nouns that are related to people with a male and female, well, for those you have a masculine and a feminine, like el hombre (the man), la mujer (the woman).
Under the title "gender" you can find lots of different lessons that are related to this.
Have a look in:
I hope it helps.
Saludos cordiales
Inma