Un and una are the two Spanish words that can mean a (an) or one.
Fortunately, there's a good rule of thumb: nouns ending in -o are masculine and most of those ending in -a are feminine.