Some Spanish nouns change meaning according to their gender. A noun in this category can mean one thing in the masculine form but have a totally different meaning in the feminine form.
It is not that complicated. You simply must memorize nouns in this category. The table below presents some of the high-frequency Spanish words whose meanings change according to gender (notice that some have a change in the spelling, but another look exactly the same):