In large part, racial. Cajuns = descendents from the Acadian deportees, a bunch of French settlers who got deported from Canada in 1755, and settled in the bayous of Louisiana.
(Black) Creoles = descendents of the slave population of the colonial French (not Cajun) parts of Louisiana.
Cajun music = traditional music of the Cajuns. Influenced by old French traditional music, and evolved into its modern form in the 20th century under the influence of Country & Western, Creole music, and Zydeco. More often sung in French.
Creole music = traditional music of the Creoles. Hardly any was ever recorded (unlike Cajun music, for which we have lots of 30's recordings). Influenced by colonial French, Cajun and African sources.
Zydeco = modern Creole music (from the 50's on). Influenced by the blues and Cajun music. Very often sung in English, or bilingually.
Both styles have a common pool of traditional songs. Cajun accordion playing, after the 30's, became heavily influenced by the style of Amedée Ardoin, a Creole musician.