Many people use these two terms—"aftermarket rims" and "aftermarket wheels"—interchangeably. Same goes for "car rims" and "car wheels." But technically speaking, "aftermarket wheels" and "car wheels" stand correct.
A rim is actually one of three parts to a wheel, including the hub and spokes. Sometimes these parts will be one piece, and other times two or three pieces. The hub is obviously the center, and it keeps the wheel attached to the car via the suspension system. The spokes come out of the hub, attaching to the wheel's rim.
It is the rim that keeps the tire attached to the wheel, which is why many people refer to wheels as "rims."
Read more about wheel construction.