In Spanish, the word before a noun (the article) needs to match the noun itself. Once you learn the basic rule, it will be easy!
Nouns are divided into masculine and feminine - masculine nouns generally end in an 'o', whereas feminine nouns take on an 'a' at the end. Once you know the gender of the noun, the article can be chosen without trouble! For a masculine noun, the basic articles are 'El' and 'Un', but for feminine nouns they are 'La' and 'Una'. A cat (Gato) is masculine, so we say 'El gato / Un Gato'. A table (Mesa) is feminine, so we say 'La mesa / Una mesa'. Simple!