Just doing a little bit of research of both surfactants but I can't seem to find too much online about them. Hopefully you guys can help out!
CTAB, aka Hexadecyltrimethylammonium bromide
DTAB, aka Dodecyltrimethylammonium bromide
Sort of a vague question, don't know where to start. To begin, CTAB has a hydrocarbon chain length of 16 (as its name suggests) whereas DTAB has a -CH2- chain length of 12.
Otherwise they have the same hydrophilic/polar "head"; all this is obvious, you can tell just by the two compounds' names. They also have the aforementioned hydrophobic "tails", which refers to the hydrocarbon chains because they are non-polar.
CTAB and DTAB can be used to create micelles. It's like how a biological cell is separated from its environment with a phospholipid bilayer where the hydrophobic and hydrophilic components of the phospholipids align such that you get an enclosed structure that separates a non-polar "organic" region in a polar environment (e.g. water). The wikipedia link has good diagrams. The reverse is called a reverse micelle, where the heads create a polar region separated from a non-polar environment (e.g. when the solvent is hexane).
For one example of practical usage, I did a lab just today using hexane as a solvent where I used CTAB to create an environment to limit the formation of CdS quantum dots. This worked by limiting the volumes where conditions aren't non-polar. In this case, reverse micelles were formed; tails pointing out, head surrounding to form a more polar center.
Another: In DNA extraction CTAB is used to pick up insoluble particles (e.g. polysaccharides) and exit the working solution. You can relate surfactants to soap, which picks up insoluble (i.e. oily) substances and can easily be removed by water due to its hydrophilic outer layer, while containing the oily substances in its hydrophobic center.
As rch has already described, CTAB and DTAB are cationic surfactants that form microheterogenous environments in solution. In aqueous solution, these micelles consist of an unpolar core and a polar boundary that interacts with the bulk (water).
The main difference between CTAB and DTAB is the surfactant concentration, at which these aggregates start to form. The CMC (critical micellar concentration) , determined by ESR spectroscopy and by fluorescence spectroscopy are in the range of 1 mM for CTAB and 14 mM for DTAB, respectively.
Note that these are just the lower limits for the formation of mostly spherical aggregates. At higher surfactant concentrations, larger rod-shaped micelles are typically observed.