Can you describe the differences between a CT scan and an MRI? When is each one used?

Try to respond with these in mind