Obviously there's a lot more complex science behind these techniques but I've tried to summarize what I personally think are the most important differences/takeaways below:
CAT/CT scan (these are the same thing): Uses X rays (HEAVY dose of radiation) combined in different angles to get a detailed view of the structure of the brain. It does not give you any information about brain activity.
MRI: No radiation, instead uses magnetic fields to give you a view of brain structure. Still no information about brain activity.
PET scan: Uses an injection of radioactive glucose to give you information about which areas of the brain are metabolizing glucose more, and are therefore more active. The downside is that it takes a longer time, you need to inject the glucose, and you don't get any information about brain structure as in the CT, only the activity.
fMRI: Same principle as the regular MRI using magnetic fields, but now you are ALSO detecting blood flow throughout the brain. Using the idea that more brain activity requires more oxygen and therefore more blood flow. So the bottom line is, you can see BOTH structure and activity WITHOUT a heavy radiation dose.
And bonus, you didn't mention EEG but it detects the sum total electrical activity of the brain ("brain waves"). So it gives you information about how the total brain is functioning, but unlike fMRI/PET it does not give you information about the activity of a specific area of the brain.