As a game, Pathfinder has many different types of damage. This guide focuses on the elements that can cause HP damage (not ability-score damage), including both the physical and mental elements.
Physical Damage
Physical damage is separated into three types. Note that while general trends are mentioned for weapon types, these are far from universal, and you can generally find any type of weapon damage with any damage dice/crit dice style.
Bludgeoning
Bludgeoning damage comes from thick, heavy weapons. Weapons that deal bludgeoning damage trend towards high normal damage dice, and are often effective on undead monsters whose lack of muscles and organs makes them resistant to other types of physical damage.
Piercing
Piercing damage comes from slender stabbing weapons. Weapons that deal piercing damage trend towards high critical damage (x3 or rarely, x4 multipliers). DR/Piercing is fairly rare, so it's not as useful for overcoming DR as the other two types of physical damage, but it does work on some aberrations, plants, vermin, and magical beasts.
Slashing
Slashing damage comes from longer cutting weapons. Weapons that deal slashing damage trend towards high critical threat ranges. DR/Slashing is most common on plants and fleshy undead, and a party facing lots of undead will probably want a good balance between bludgeoning and slashing gear.
Magic Damage
Magic damage isn't a separate type of damage, but rather an additional quality. DR/magic is common, but also easy to bypass since characters are expected to have magical gear early in a game.
This becomes more important if your character has a backup weapon in case the first doesn't work. This might be anything from carrying both a club and a longsword to having a crossbow or sling for foes that fight at range. If a secondary weapon isn't enchanted, it may do far less damage than even a partially-resisted main weapon (potentially none at all). Temporary enchantments (from spells, scrolls, class abilities, or other sources) are especially helpful here, since they ensure the consistent damage of a secondary weapon without forcing you to invest too much GP.
Energy Damage
Energy damage is, broadly, broken down into a few separate categories. Four types of energy damage (fire, cold, acid, and elec) are fairly easy for characters to obtain and swap between. The others are a little harder to get ahold of, or simply have fewer available options.
Common Damage Types
Acid
Acid is one of the basic elements, though it's a little less common than fire and cold. It has the same anti-Regeneration properties as fire, and notably, daemons are immune to this element.
Cold
Cold, like fire, is a fairly common type of energy for enemies to resist. While none of the big three categories of evil outsiders (daemons, demons, and devils) are immune to it, all of them resist this type of damage. Furthermore, resistance to cold is fairly common among undead as well.
Elec
Arguably the rarest of the common energy damage types, electrical damage often has a different targeting scheme. While many of its attacks are direct ranged touch attacks or lines, some electric spells attack foes from above. This can provide helpful options in battle. Demons are immune to this type of damage, making it a poor choice for campaigns featuring this type of foe.
Fire
Fire is the most commonly-resisted type of energy in the game (sorry, Fireball fans). Characters who want to use this type of damage should invest in ways of overcoming Energy Resistance and Immunity to Fire. Notably, devil-subtype outsiders are immune to this element.
Aside from igniting things, fire is notable for being one of the two elements that often help turn Regeneration off.
Uncommon Damage Types
Other types of energy damage are rarer than the four above.
Positive/Negative Energy
These mostly feature in undead-heavy campaigns. Positive energy usually - but not always - heals creatures instead of hurting them, while negative energy does the opposite. Undead famously twist this around to heal from negative energy, and many of them resist positive energy.
That said, if you're not fighting undead, negative energy is highly effective and rarely resisted. It's reliable, but not the strongest type of damage unless you're extremely specialized.
Sonic
Sonic energy is hard to come by, though it's more prevalent than force damage. As a newer energy type, it's resisted by few creatures, making it a reliable choice if you don't know what a foe resists.
Rare Damage Types
Rare damage types only appear with a few spells.
Aligned Energy
Aligned energy, as the name suggests, deals damage based on the user's or target's alignment. As this is not a weapon damage type, it generally bypasses DR, and it can also help shut down fast healing or regeneration on some creatures. Aligned energy damage may come from weapon enchantments, spells, or even the natural abilities of certain creatures.
Note that the specific details often vary by source. Some sources of aligned energy may do more or less damage to certain targets, so check the source before you use it.
Force
Force magic is rare - only a few spells, like Magic Missile, use it. Even in Spheres of Power, the only official Force-type damage for Destruction requires a Spell Point to be spent, and custom Blast Types should not attempt to circumvent this.
Force's defining feature is its reliability - almost no creatures in the game resist it, up to and including incorporeal foes. This makes it ideal for hunting ghosts. However, to balance it out, it also does less damage than most other attacks.
Hybrid Damage
Hybrid damage comes when damage types are mixed - for example, a spell might deal half Fire and half Holy damage (with the holy damage not being subject to the foe's resistances). These spells have a couple of different uses, including testing damage types (to see what a foe might resist) and still dealing some damage even when a foe is immune to part of it.
However, if a foe resists both elements, hybrid damage spells almost never do much. In short, they're fairly risky to use. One relatively common form of hybrid damage is plasma damage (half fire/half elec), and some divine spells use this as well.
In Spheres of Power, the Admixture talent of the Destruction sphere lets you create hybrid attacks. This allows you to deal different types of damage and potentially inflict multiple effects on a foe, making it a more practical option.
Untyped Damage
Untyped damage almost always comes from magical sources, so it's been included in this section. As the name implies, though, it has no type. Damage Reduction and Energy Resistance do nothing to stop it, though Spell Resistance might. In effect, Untyped damage is a slightly superior version of Force damage, and much like its companion it tends to deal less damage than other attacks.