40 Nm is 40 Newton x 1 meter pole. Socket will have a handle of usually 25 cms (i.e. 0.25 m) what gives a force of 160 N to be applied at the end of the 250 mm long handle. 160 Newton is equal to a force of made by 16,3 kgs of weight or roughly 36 pounds.
That is the easy-ish part. After torquing it to 40 Nm, you need to do another 90 degrees and I guess that is what HURTS