If you came from another game, forget about the tank/dps/healer trinity. It is not present in GW2, and the lack of that trinity is an explicit design goal. The trinity in this game is DPS/support/control.
A Guardian can do all three, but is primarily a DPS and support profession. Guardian support works not by healing or tanking damage, but by preventing damage to the group. You have a large variety of blinds, personal and group blocks (aegis), condition removal, projectile reflection, and by giving boons to your allies. You can also provide fire and light fields, and you have a few blast finishers on your weapons.
Nearly all weapons have a use, and eventually you will want to carry one of everything. Swap things around depending on need.
Greatsword is one of your primary offensive weapons. 2 is excellent AoE damage, 3 is a blind, and 5 will pull the mobs together so you can more efficiently kill them. This is a mainstay in dungeons, one of the best for the open world, and effective in some PvP and WvW setups.
Hammer is a defensive weapon. While slow, it still puts out a reasonable amount of damage. It supports your group by granting the Protection boon as you attack with it. It has a blast combo finisher on skill 2, an immobilize on 3, a knockback on 4, and a ward (prevent mobs from crossing, unless they have stability) on 5. It’s best used when your group is fighting something difficult and the group is having difficulty keeping alive. The drawback to hammer is that it extensively uses Light combo fields, which are often detrimental to an organized group. It’s used in all game modes, but only when you need the added defense or need some control.
Staff is a weak damage weapon, but it has some support. Your autoattack will hit 5 targets, while most autoattacks hit 3. 2 is a fairly weak and difficult to use heal, 3 grants swiftness, 4 is a heal and provides Might to the group, and 5 is a ward. Staff is best used when you’re “tagging” a large number of mobs in massive group fights; for mobility in the open world as a swap weapon (do damage with your other weapon set); for PvP; or used in very specialized world vs. world support setups.
Sword, as said above, is a high damage and support mainhand. Your autoattack is very strong (but be warned that the third strike is a set of projectiles, using it on some enemies will reflect back to you, and hurt). 2 is a teleport and a blind, due to the weakness of the damage, it should only by used when you need the teleport or blind effect. 3 provides some situational and touchy projectile protection. Sword is used in all game modes.
Mace is another defensive weapon. It has a reputation for being low damage, but recent theorycrafting shows that it actually has fairly good damage. It heals on the third strike of the autoattack. It’s mainly used in PvP support/“bunker” builds due to the healing and pressure. The 2 skill provides a regeneration field to the group. It can be used elsewhere if you need the extra block with the 3 skill. This is another weapon that makes heavy use of light combo fields, so it can be a problem in some groups.
Scepter is your only long range weapon. It has the highest damage skill a guardian has, as long as all of the parts hit, on the 2 skill. You will see good results on very large enemies and objects. It also has an immobilize on the 3 skill (though note the shorter range). You will always want to have one of these in your inventory, but only swap to it when you need range or you are fighting very large enemies.
Focus is your primary offhand. It provides group condition removal and a blind on 4. 5 will block three hits, do damage, and is a blast combo finisher. With the vulnerability on blind trait, the 4 skill is a large boost in damage to the entire party since it bounces and hits the enemy multiple times.
Shield has some situational uses, but is not the best general purpose offhand. The 4 skill provides short duration Protection in an arc in front of you; and 5 provides a knockback, projectile block, and a small heal. Both shield skills are on very long cooldowns. If you need an extra one of the above functions, use it, but otherwise Focus will be of better use.
Torch is odd, it’s supposed to be a damage offhand, but it doesn’t provide much of a damage boost. 4 burns enemies and can do a fairly high damage attack, but on a long cooldown. 5 actually results in a DPS loss. Torch can be used when you don’t need any defensive skills, but it’s not used that often.
Yep, this pretty sums it up concisely. I am curious about your choices for armor and runes.

)