This is a two-fold question. I've always loved the age of sail and wanted to learn more about it, but most of my information comes from fantasy novels and games.
Beyond just my curiosity about this age however I am trying to blend the age of sail with another of my hobbies, table top games role playing games. However it only took about 15 minutes worth of work before I realized, I have no clue what most of the crewmen on a ship do. As such, I have to ask, why did ships need such large crews? How many men did it take to properly run the rigging, and what else needed doing?
Crews on fighting ships were large because there was a lot more to do than just run the rigging -- particularly in battle, guns needed crews of 7-10 men (or more) and ships would often try to ensure there were enough men to fight, if not both sides, at least some of the guns on the other broadside. They'd also have to do that while still sailing and navigating the ship, running powder from the magazines, caring for the wounded, communicating with the admiral, etc. When not in battle, ships needed large crews to be able to quickly make sail or take it in, lower boats and other gear over the side, weigh the ship's anchors and do a lot of the other mundane tasks of sailing. Certainly merchant ship crews could get along with a dozen or so people to carry cargo, but bigger crews would make the process quite a bit quicker.
As to how crews were organized, there were three four main classes of people aboard ships: commissioned officers, warrant or petty officers, seamen, and Marines. (There were also sometimes people outside the chain of command, such as for example supercargoes, ambassadors, wives and sometimes children, but let's keep it simple for now).
The commissioned officers received, well, a commission from the Navy and would include the captain and his lieutenants, as well as of course an admiral if one were aboard. Midshipmen, usually teenage boys, were technically master's mates (that is, mates of the sailing master, a warrant officer), but were understood to be officers in training, though they could be disrated and turned before the mast for poor behavior. (This is a plot point in the Aubrey-Maturin series of books.)
Warrant officers included men permanently attached to the ship, such as the gunner, master, boatswain, and carpenter, as well as the surgeon, purser and chaplain. There was to an extent a divide between the "gentlemen officers" such as the surgeon, purser and chaplain and the "tarpaulin" sailing officers. The sailing master and the officers were usually the only men aboard who understood navigation, with the midshipmen learning it. The warrant officers generally had mates to help them run the ship.
The sailors themselves were generally organized into divisions, at least after the 1750s or so, usually organized by the mast they belonged to or the other jobs they had. The idlers -- that is, the men who just worked all day and didn't stand a watch, such as the sailmaker and his mates, or the stewards, or carpenter's mates -- usually were in their own division, and an officer was assigned to each division. The goal of that was to ensure that in a large mass of men -- 700 or more in large ships -- every man would have an officer or midshipman who at least knew his name, station, etc.
Marines were naval infantry, commanded by a Marine officer (usually a lieutenant or captain; the captain would brevetted to "major" while aboard so there would only be one captain aboard) who guarded the officers and the powder magazine, and were used as infantry in shore landings and wielded muskets in sea battles. The Marines were allowed to learn seamanly skills if their schedules permitted, but couldn't be ordered aloft, and generally kept separate from the regular sailors -- the crews were quite aware that they were there partially to quell mutinies, by force if necessary, and there was often some bad blood between them.
Hopefully that makes some sense -- also, here are some older links I wrote about crew, officers, sailors, Marines, etc. Please let me know if you have other questions!
Edit Forgot Marines. :(