How do PET and MRI work

How do PET and MRI work? If you were showing a person words while having an MRI, what brain areas would probably be active?