Thank you sir!
the primary difference between muskets and rifles is that muskets are smoothbores, because they don't have any rifling on the inside of a barrel, rifles, on the other hand, which had been introduced during the napoleonic wars (see the sharpe series) are much more accurate, this is because the rifling gives a spin on the bullet as it flies, so it cuts through the air better. Also, in the napoleoninc wars especially, the barrel did not always fit exactly to the bullets, so it would bounce off the side of the barrel and go every which way.
Most every firearm at this point was a front loader, which means that you have to set the butt of the rifle on the ground, take out some powder, ram that down, take the bullet, ram that down, and then on the back was the hammer which had a thing to ignite the powder, you would pull that back, pull the trigger and bam, gun goes off.
In the Napoleonic wars, the weapons were not very effective, especially considering that the redcoats, as the british were called, actually wore bright red coats, which was to cover up the blood when people got shot and keep up morale but I digress, also all the weapons were front loaders like the muskets I described, and the cavalry used sabers, like we all picture.
Conversely, in the civil war, the gatling gun had recently been invented but was very rare, and the cavalry were given repeating rifles, where you load the ammunition into the back of the rifle, then flip a lever, usually the trigger guard, to chamber another round. Also the effective range of the rifles went from about 20-50 yards for semi-accurate fire in the napoleonic wars, to 50-100 yards in the civil war, and also it must be noted that in this time period everyone got in a line and shot at each other, all standing up in a line, which had something to do with the casualties, but General Lee invented trench warfare, which was more common at the end of the war.
This leads us to World War One, with huge trench systems, with large charges between trenches met by heavy machine gun and artillery fire, bolt action rifles being the most common weapon, besides machine guns.
EDIT: particularly for HM, but on the battlefield of antietam, or most any battlefield, there are cannons, and most of them have rifling, so you can go see that, and I guess while I'm thinking about Cannons I'll go into that. Cannons were loaded like muskets, mostly, where they load from the front, first someone with a wet cloth on a stick would run it through the barrel after a screw to clean out any debris or sparks. then a powder charge in a paper bag, usually would be put in, with one or two charges, depending on what you wanted to get out of the gun, and the back of the bag would be torn open, btw, and then would be loaded the round, either round shot, for battering down fortifications, or going through lines of people, canister, for anti infantry, these were cans filled with musket balls to make a large shotgun effect, or exploding shot, with a fuse that would detonate a certain time after firing, these are seen in the movie Sahara. a fuse would be put in the back of the cannon, then lit, and there was also a second hole in the back of the cannon, and it was someones job to have a thick leather thumb guard to hold his thumb over that while the cannon fired, no idea why that is. Anyway the fuse would burn down to the powder and the cannon would shoot.
Other stuff I reccomend about this stuff:The movie Gettysburg, The Book The Killer angels, The TV show Band of Brothers, the Movie Saving Private Ryan, the Books and movies about Sharpe, with the british rifles, starting with Sharpes Rifles