The Commanding Officer (CO) is the one who runs and commands the entire ship. He is above all else. The only one who can step above him in order is the Chief Medical Officer, but only when he refuses to do something medically.
The Executive Officer (XO), or First Officer, is the second in command of the ship. He reports directly to the CO. The XO's usually compile montly reports for the CO to read.
The Second Executive Officer (2XO), or Second Officer, is the third in command of the ship, and they either report to the XO or the CO. 2XO's usually have a second position on the ship besides 2XO.
Second Executive Officer
The Helm Officers are the ones responisble for piloting the starship. Without them, the starship would just float meaningless in space.
JAG Officers (Judge Advocate General) are the ones that deal with the law. They manage courts and court cases. Some starships have JAG officers assigned to them, but others just report to starbases to deal with any court cases.
The Operations Officers are the ones that deal with scanning for lifeforms, detecting stuff in space, etc.
Engineering Officers are the ones who hang around in sickbay and deal with keeping the ship together during battle, phenomena, and everyday activities.
Tactical Officers are the ones who man the weapons controls/stations. They operate the shields, weapons, and communications. Every on-duty tactical officer is armed with a phaser.
Security Officers are the ones responsible for the safety of the ship and it's crew. Every on-duty security officer is armed with a phaser.
Medical Officers are the ones that deal with medical issues of the crew. They usually hang around in sickbay. During battle, the medical department is usually the most active department on the ship.
Counsellors are healers, like the medical officers, except they deal with mental issues, whilst doctors deal with medical issues.
Science Officers deal with the studying of new lifeforms and other scientific issues. They mostly hang around the science labs, although some tend to hang around the science stations on the bridge.
Thanks go to Steven J. Marriott, of Tangofleet PBEM RPG, for use of his department symbols. I'm sure you'll agree they are excellent. Please visit their site at www.tangofleet.org.