"The horse closed all the doors."
Translation:El caballo cerró todas las puertas.
In common with references to many types of animal, the species name 'horse' is used regardless of gender. In Spanish, that uses the masculine noun «caballo»
If you want to specifically differentiate the gender of the horse, there are two ways:
A mature male horse is called a 'stallion' («un semental» or «un padrillo»), the female a 'mare' («una yegua»)
Or you could use «caballo hembra» - female horse and «caballo macho» - male horse