There are many different possible pan laws, but in IT the left channel is always only heard on the left speaker and the right channel is only heard on the right speaker (which is balance rather than panning, strictly speaking). It is implemented using exactly the same logic as mono sample panning, except that for the left channel output, you multiply the left sample channel with the left pan factor and for the right channel output, you multiply the right sample channel with the right pan factor.
Surround is also implemented exactly the same way as for mono samples (inverting the right channel), but you have to keep in mind that in IT, surround and panning are mutually exclusive, i.e. a sample channel be panned hard-left and surround at the same time.