Musket be a muzzle-loaded, smooth bore long gun, fired from the shoulder. Muskets were designed for use by infantry. In the Golden Age and Late Pirate Era, they were used with all varieties of flintlocks and became light enough to shoot without a fork. All navies and pirates used muskets, even though you rarely see them used in pirate movies. The sharp shooters were posted up in the fighting tops to shoot at the enemy below. Usually of .69 to .75 caliber, they were an effective weapon with a bayonet.
Rifles be a firearm designed to be fired from the shoulder. It has a barrel with helical grooves cut into the inside barrel walls, that will make the projectile spin. This spin stabilizes the projectile which highly increased accuracy. Usually designed for smaller caliber than a musket, with 50 cal being very popular. Rifling of barrel started in the mid-15th century. Rifle were used by hunters n' sharpshooters. The draw back of a rifle was slow rate of fire. A rifle required a mallet to pound a ball down the barrel. A smooth bore musket, the ball could be simply dropped down the barrel. So the rate of fire for a musket was 3 to 5 round per minute vs. one round every 3 minutes.
Carbine be shorten version of a Musket. Also called a Musketoon. Musketoon with flared barrel arrrr called Blunderbuss. The smaller size and lighter weight of carbines made them easier to handle. The barrel were designed to be short enough to be loaded on horse back. This was mostly a calvary weapon, but was also use on board ship, as it was faster to load. Spanish name for carbine is Escopeta.