I see NPCs with stat blocks that have "Hit Points: 142 (15d8 + 75)" (for example). I was wondering where the "+ 75" (in this case) came from?
It's usually based on the creature's Constitution modifier.
5E creatures are often statted as though they have player levels, with effective "levels" and "proficiency bonuses" baked into the final stats that are visible in the stat block.
For the example you described, the monster probably has a Constitution of 20 (+5), and has an effective "level" of 15, with d8 as its hit dice. So their final hitpoints are 15 × (1d8 + 5), or 15d8 + 75, for an average hit points of 15 × 4.5 + 75 = 67.5 + 75 = 142.5, rounded to 142.
Most of this is esoteric, and really only matters if you have a mechanic that specifically depends on a creature's hit dice—a mechanic which only comes into play for PCs, normally. There are a few mechanics and feats that would be affected by the minutiae of these calculations, though.
None of this should be confused to represent Challenge Rating, which has its own calculations and stipulations.
It is based on the DMG/MM HP calculation suggestions
What is the “+ 75” in these NPC hit point stats?
"15d8 + 75" means you have to roll d8 15 times and add 75 in order to determine this particular creature's maximum hit points. So +75 means a flat bonus to add.
So where it comes from, and why +75 ?
At the end of the day, it is the DM (or the specific adventure author) who decides, how many hit points should the creature have. They should (although not have to) stick to the DMG rules. See DMG page 275 "Creating a monster stat block" for the details.
Hit points directly influence the creature's CR, as shown in the Monster Statistics by CR table.
A monster's hit points have a direct bearing on its challenge rating, and vice versa.
Specific CR assumes specific hit points range. Alternative, a DM might use number of hit dice modifiers:
A monster can have as many Hit Dice as you want, but the size of the die used to calculate its hit points depends on the monster's size, as shown in the Hit Die by Size table. For example, a Medium monster uses d8 for hit points, so a Medium monster with 5 Hit Dice and a Constitution of 13 (+1 modifier) has 5d8 +5 hit points
Is it usually CON modifier plus any modifiers DM thinks are appropriate. See Monster Manual, page 7, "Hit Points":
A monster's Constitution modifier also affects the number of hit points it has. Its Constitution modifier is multiplied by the number of Hit Dice it possesses, and the result is added to its hit points.
In your particular example the creature might have +5 CON modifier aside with 15 hit dice. That gives this exact 15 × 5 = 75 bonus. Also, the DM can freely add (or subtract) hit points in order to match the CR table.
In short, it comes from its CON modifier.
The numbers in brackets provide formula to roll for the monster's HP and it works just the same as with PCs. In this case the 15d8 comes from a medium (hence the d8; a small one would have a d6 and so on) monster on a 15th "level" (not really a normal level, just a concept used in building the stats) plus 15×[CON MOD]. So I would suspect that the monster has CON +5 (since 75 = 15×5).
You can then check that average HP is 15 × 4.5 + 75 = 142 (round down).