Why are there masculine and feminine words in Spanish?

التعْلِيقَات

Flag fr Flag es Flag en Flag it Flag de Flag pt Flag he עִברִית