The resistivity of conductors increases with temperature because increased thermal agitation disrupts the orderly flow of electrons, leading to more collisions and higher resistance. In semiconductors, resistivity decreases with temperature because higher temperatures promote the generation of more charge carriers (electrons and holes), which enhances conductivity.