All things work together for good. Not some, not only the good ones, all. This doesn't mean everything that happens is good. It means God can form something good from everything. Even from what hurts.
This promise applies to those who love God. It is a relational promise. God takes the threads of your life and weaves from them something you may not yet see.