How does back propagation works through layers like maxpooling and padding?
Max pooling will cancel the effect of not pooled values to the gradients. 
Padded values either have no effect.

Nice thing about convolution is, that it is basically reducable to a matrix multiplication and the backpropagation is simply the transposed of it. So you have already your backward pass stored in the foward pass.