Could be several reasons.
Different metals have different rates of conduction, so a handle made of brass or aluminium would get very hot, stainless steel not so hot because it has a much lower thermal conductivity.
You also find most metal saucepan handles are hollow so they have a high surface area, this means they will radiate the heat transferred into them quickly, if the heat can be radiated quicker then they conduct the heat into them they won't get hot.
Also a lot of saucepans will have a small insulating pad between the body of the saucepan and the handle.