All nouns in Italian have a gender (masculine or feminine) and the articles must agree with the gender. Masculine words generally end in o and feminine words generally end in a. Words that end in e may be either, so you will just have to memorize the gender.
Il ristorante (restaurant), il caffé (coffee), lo studente (student)
L'automobile (the car), la notte (the night), l'arte (the art)
Nouns ending in ione are generally feminine,
La stazione (the station)
La colazione (the breakfast)
while nouns ending in ore are generally masculine
Il lavoratore (the worker)
Il dottore (the doctor)
Nouns ending in a consonant are usually masculine
Lo sport (the sport)
Il bar (the bar)
Keep in mind that articles are used before nouns or before an adjective + a noun.
2.1 Definite article (Articolo determinativo)
Masculine singular (maschile singolare)
Masculine plural(maschile plurale)
Il used before consonants
I used before consonants
Lo used before z, gn, ps, or s + cons.
Gli used before vowels, z, gn, ps, or s + cons.
L' used before vowels gli Il cane (the dog)
I cani (the dogs)
Lo zucchero (the sugar)
Gli zuccheri (the sugars)
L'albero (the tree)
Gli alberi (the trees)
Feminine singular (femminile singolare)
Feminine plural(femminile plurale)
La used before consonants
Le used before both consonants and vowels
L' used before vowels
La casa (the house)
Le case (the houses)