When you get a mammogram do they compare it with the previous mammogram if done elsewhere?

Yes. If previous mammograms from another hospital are available, a comparison is made. Occasionally, the previous mammograms are not available and the current mammogram is interpreted. Once the previous mammograms become available, the report is revised.
If they have them. Be sure to get your prior mammos and bring them with you to the new facility, or have your old facility send them. If you do this ahead of time, your mammo will be interpreted more quickly, because the radiologist won't have to wait for the old ones. If you are unable to do that, bring accurate information on where and when the priors were done, so the facility can try and get them.
Yes. Yes, if they have the mammogram result from the previous mammogram- the radiology would compare the recent one with the previous one and see if there is anything changes. If you never have mammogram previously, then you mammogram now would be the baseline. If you had mammogram somewhere else- make sure you tell the radiology center that you had one before and where it was done.