While @ingalls has a really great EQ writeup, I thought I'd add more context for New England, specifically:
This is a newspaper piece I wrote about an EQ here in Western Massachusetts 3 years ago. The mechanisms / geological context for earthquakes in New England are pretty much all the same, and what I wrote there applies for York, ME as well:
https://montaguereporter.org/wp-content/uploads/2022/03/March-10-2022.pdf
(My credentials: I used to be Assistant / Associate State Geologist for Massachusetts, specializing in bedrock geology)