Quick List:
DS: DS and DSi enhanced games
DS Lite: DS, DSi enhanced, GBA games
DSi: DS and DSi enhanced games
Old 3DS: DS, DSi enhanced, 3DS games
Old 2DS: DS, DSi enhanced, 3DS games
New 3DS: DS, DSi enhanced, 3DS, New 3DS games
New 2DS: DS, DSi enhanced, 3DS, New 3DS games
If you're asking about older cartridges in a fresh console, they should work perfectly.
Long Version:
The DS, DS Lite, and DSi can play all DS games.
The DS and DS Lite can also play "DSi enhanced" games, just lacking the camera feature that comes with playing on the DSi.
The DS Lite, and only the DS Lite, is the only DS console that is backwards compatible with GBA games.
The DS, DS Lite, and DSi cannot play 3DS or New 3DS games.
The 3DS and 2DS systems can play all DS and 3DS games.
The old 3DS and 2DS models cannot play "New 3DS" games, there are only four of these: Fire Emblem Warriors, Minecraft, Xenoblade Chronicles 3D, and Runbow Pocket Deluxe Edition.
New 3DS games can only be played on 3DS/2DS models with "New" in the name.