Here's an example with one of our now-NPCs: Princess.
Princess is a bard. At first level she got her max HP for the class, 8, plus 1 from her high CON. Then, when she advances to level 2, her player could take the "average," which is 5, plus 1 from her high CON, for a total of 6, or the player could choose to roll for a chance to get a 6, 7, or 8 on the die. The player (that's me, now) chooses to roll.
With that roll, Princess gains 8 HP, for a total maximum HP of 17.
In addition to the HP, Princess gets two new features and a spell:
- Jack of All Trades, which increases all unproficient skill checks +1
- Song of Rest, which allows Princess to play music to improve the healing that PCs get from spending hit dice during a short rest
- Dissonant Whispers, a spell that fits well within her theme as a music-powered hero
Rolls
Princess' HP for level 2 - (1d8+1)
(7) + 1 = 8