Since you are using a padding of 2 for a kernel size of 5, the spatial output should be constant.
The input is expected to be a 4-dimensional tensor in the shape [batch_size, channels, height, width], while the kernel has the shape [out_channels, in_channels, height, width].
In the default setup (not depthwise or grouped convolution) the kernel will be applied to patches of the input in a sliding window manner using all input channels.
Have a look at CS231n 1 which explains the underlying method pretty good.