You start everything with Unbound, ie take whatever you want. However instead of these you can take Detachments to restrict your army, but gain better rules (and generally just so you can play tournaments).
You can generally take as many detachments as you want, but the most common is the CAD from the rulebook. But the Allied detachment is another example, plus others released in codexes and campaign supplements exist.
At the most simple if you want to take a Dark Eldar army with allied Eldar, you take a Dark Eldar CAD and an Eldar Allied Detachment. Both of these detachments have the objective secured special rule so yay. If you wanted you could simply take a Dark Eldar CAD and an Eldar CAD too. Or a Dark Eldar CAD and any one of the new Eldar formations/detachments from their codex... You dont have to take your Dark Eldar as a CAD either, theres a few Dark Eldar specific detachments too (I think theres a 6 Fast Attack one in the codex??).
The only restriction you have in general is that your Warlord cannot be from an Allied Detachment (the specific allied detachment from the rulebook, not any detachment that happens to be allies).
Tournaments will add their own restrictions, generally you see a max of two detachments, and sometimes some other more specific shenanigans like the large/medium/small from ETC and something similar from Community Comp.
Son of Russ