I’m bad at grammar.
L’enfant = The kid
Un enfant = A kid
Les enfants = The kids
Des enfants = Some kids
I guess you know the difference beetween "the" and "a" in english, it’s the same in french.
In your example, "D’enfant" is the contraction of "de":
Les jeux d’enfants = The games of kids
Je viens d’afrique = I come from Africa
Je viens des montagnes = I come from mountains
If you have "le arbre" it will be "l’arbre" the same way than "a apple" -> "an apple" for easiest pronunciation
Les and Des are never shortened to L’ and D’.
Le and De are shortened when located before a vowel or a mute h. There is also la (la amie -> l’amie), que (que il vienne -> qu’il vienne) and others like te, me and similar.
There are three separate issues.
L’ is always short for le and d’ is always short for de. Les and des are never elided. The same goes for je, me, ne, se, te.
The elided form (d’, l’, …) is used when the next word starts with a vowel sound: le fils, l’enfant. Semi-vowels count as vowels: l’iode, l’oiseau. The letter H is special: although it is never actually pronounced, it counts as a consonant in some words (aspirated H), while it doesn’t count in other words (silent H). The general rule is that words derived from Latin or Greek roots have a slient H while words built on Germanic and other roots have an aspirated H (there are exceptions).
This covers the easy part. The third and more difficult issue is that there are multiple words spelled de.
- A preposition: “le livre de ma sœur” (lit. “the book of my sister”, i.e. my sister’s book); “il sort de la maison” (“he comes out of the house”).
De le* is contracted to du and ** De les* is contracted to des.
- The first part of the partitive article: “il boit de la bière” (“he drinks (some) beer”). Here de la is the partitive article; the fact that it looks like de followed by the definite article is a coincidence.
de le* is contracted to du and ** De les* is contracted to des.
- The plural indefinite article; this is normally des but sometimes de.
I think that this page has a very clear explanation. It is all in French, though:
Here is the part about why it may seem like des is sometimes changed to de/de la/du in English:
“Des” in the negative construction or in front of a qualitative plural adjective placed before the noun becomes “de” or “d'” (in front of a vowel):
• Elle a des robes. ==> Elle n’a pas de robes / Elle a de belles robes.
• J’ai vu des animaux. ==> Je n’ai pas vu d’ animaux / J’ai vu d’ énormes animaux.