Let the first cousin be x years old.
The other cousins must be (x + 2), (x + 4) and (x + 6) years old.
Since their total age is 36, we have:
x + (x + 2) + (x + 4) + (x + 6) = 36
4x + 12 = 36
4x = 24
x = 24 / 4
x = 6
Thus, the cousins are 6 years old, 8 years old, 10 years old and 12 years old.