There are several forms of articles in italian. By this, I mean that the article will change its form depending on the noun following it. There are several cases to consider. The first is of course the gender of the noun, masculine or feminine. The second case is the starting sound of the noun. And the last case is the number of the noun, singular or plural. The first and the third cases are, in some sense, very natural, at least for me, if someone has learned some other languages, like French or German. The problem is the second case. Yet, if we think more, we should find that this is the point which shows that Italian is a logical language: it always tries to make pronunciation easier.
More precisely, if we only consider the first and the third cases, we have that, before a noun singular and masculine, we should use il(definite article) or un(indefinite article). Before a noun singular and feminine, we should use la or una; before a noun plural and masculine, we should use i or dei; before a noun plural and feminine, we should use le or delle.
Yet Italian considers also the first sound of the noun. If this sound is a vowel, then we should avoid two vowels appearing at the same time, and if this sound is something like ‘st,sc,gn,ps,z’, then we should avoid too many consonants appearing together. For the first situation, we change la to l’, una to un’, i to gli, and dei to degli. And for the second situation, we change change il to lo, un to uno, i to gli, dei to degli. For example, il/un treno, lo/uno studente, l’/un amico, la/una ragazza, l’/un’amica, i/dei quadri, gli/degli italiani, le/delle città.
Note that the sound gli appears in both these two situations. This sound is a little particular in Italian. It serves both as a vowel and as a consonant. In gli, the sound l is stronger than the sound i after it, and this makes it sounds like a consonant.