How Do They Figure out Who Starts an Outbreak?

How do they figure out who started an outbreak and how do they get them under control so quickly?