Well, it can mean a number of things depending on its application and use in the sentence:
A wilderness at the edge of a settled area of a country
An international boundary or the area (often fortified) immediately inside the boundary
An undeveloped field of study; a topic inviting research and development
for example: "he worked at the frontier of brain science"
Past 'un homme' or 'une femme', there's no pattern that's absolutely foolproof.
However, you can make a reasonable guess from the ending; https://www.thoughtco.com/french-gender-masculine-endings-1368853
Past that, loanwords usually follow the masculine default (like 'le walkman').
If you can't remember, apply a sexist stereotype and you'll probably be right, hence 'la cuisine' and 'le salon'
One tip I came across is when learning new vocab is to think of an extreme mental image/link. For example the French for hedgehog is "hérisson". You then think of, say, having a son with really spiked hair, i.e. an hairy son. When it comes to gender one, of course, needs to try to learn the gender whenever coming across a new noun. To help memorise the gender you always associate masculine nouns with, say, a boxer. In my example imagine a boxer dancing around a boxing ring trying to box a hedgehog. For feminine nouns you always associate the noun with, say, the smell of sweet perfume. For example a cow is "une vache", so you imagine washing (ie "vashing") a cow to make it smell sweet. Now this method might sound strange/long winded but in memory tests it works very well.