When you start learning Spanish you learn that all nouns are classed as either masculine or feminine, however in reality there are exceptions when you can use a word with either gender, each with a different meaning.
Normally this relates to someone’s occupation, for example, el policía = the policeman, la policía = la policía. El periodista = the (male) journalist, la periodista = the (female) journalist. Other words can be used with either gender but be careful as their meaning changes. There is no reason for this so you just have to learn the gender with the noun and try to remember the following:
boleto/a: el boleto = ticket (travel) / la boleta = ticket (fine/penalty)
bolso/a: el bolso = handbag / la bolsa = larger bag/sack
capital: el capital = capital (money) / la capital = capital city
cometa: el cometa = comet / la cometa = kite
corte: el corte = cut / la corte = court (law)
cura: el cura = Catholic priest / la cura = cure
final: el final = end / la final = final of a tournament
frente: el frente = front / la frente = forehead
guía: el guía = male guide / la guía = guidebook or female guide
mañana: el mañana = future / la mañana = morning
papa: el papa = the pope / la papa = potato (Latin America)
parte: el parte = document / la parte = portion
pendiente: el pendiente = earring / la pendiente = slope
policía: el policía = policeman / la policía = police force / policewoman
radio: el radio = radius / la radio = radio
trompeta: el trompeta = male trumpet player / la trompeta = trumpet / female trumpet player
vocal: el vocal = male committee member / la vocal = vowel/female committee member