I think most phrases like this one are too simplistic and get re-used too often in these questions. Im only saying this after seeing them literally hundreds of times across multiple lessons ("a book", "The exam", "the spanish exam", etc). Are there going to be longer and more conversational sentences used soon?
Un is masculine. Una is feminine. Unlike English, Spanish has 'grammatical gender' for all nouns, which means every noun is either masculine or feminine. Conveniently, a lot of feminine nouns in Spanish end in 'a' so that's a good hint, but there are exceptions (la leche). Notice a lot of the person/family words distinguish between male and female the same way (hija/hijo, niña/niño etc).