The bonus points
On the most common weighting system, honors classes add +0.5 and AP or IB classes add +1.0 to that class's grade points. So an A in an AP class counts as 5.0 instead of 4.0 on your weighted GPA.
Unweighted GPA is unaffected
Your unweighted GPA still caps an A at 4.0 regardless of class difficulty. That's why students often have a weighted GPA above 4.0 and an unweighted GPA at or below it.
Is it worth it?
Generally, yes — colleges value course rigor, and a slightly lower grade in a challenging class is often viewed more favorably than an easy A. Just avoid overloading to the point where your grades slip across the board.