Woman is a noun (used with a/an/the) and female is an adjective (which describes a noun). So we say:
She is the country's first female president. woman president
The president of the country is a woman. a female
There is a similar rule with male (adjective) and man (noun):
Male life expectancy is often lower than female life expectancy.
(male/female are adjectives describing the noun "life expectancy")
Women live longer than men.
It is possible to use "female" and "male" as nouns, but this is usually only done when talking about animals - or when writing scientific papers where humans are part of the experiment:
The treatment was given to three males and three females between ages 40 and 45.
There are nine puppies available for adoption - seven males and two females.
Masculine and feminine are also adjectives which describe things that are like what people perceive to be typical of a man / typical of a woman.
Pink is considered a feminine color.
(women typically enjoy/wear pink; men typically do not)
American football is considered a masculine sport.
(men typically play/enjoy American football; women typically do not)