Aftershocks are usually a smaller magnitude than a main earthquake. Aftershocks happen when the plates are trying to fall back into the place they were, triggering other earthquakes. Aftershocks can happen dozens of miles away from the epicenter of the main earthquake but mainly happen within the same area as the main shock. They can happen any time after the main earthquake.
top view
my own illustration