There are many threads that have asked this question before, but basically -
When you are at a station, you just unmount a weapon to clear a spot. That is done by clicking on the mount/unmount icon in the upper left of the weapon's display. That weapon goes towards the bottom of your weapons listing and all those weapons that you have that are able to be mounted in the now vacant slot show a mounting icon in their upper left display. Just choose the one you want and click its mount icon and it will move to the vacant slot. You can do this as many times as you wish, but you must be docked at a station/planet to do it. There is no changing on the fly