Some words ending tend to show the French word is masculine, and there are also some feminine word endings, but most of the time you can't guess and just have to memorize the gender of the noun by heart. For example: a book in French is masculine, un livre. a table is feminine, une table.