If a US Senator dies or resigns who replaces him?

Typically, the governor assigns a temporary Senator to cover the position until the next election. Usually appointed by governor of the state, but it depends on the state.