Hysteresis in magnetic materials: the role of structural disorder, thermal relaxation, and dynamic effects