Proverbs 11:8 (ESV)

8 The righteous is delivered from trouble, and the wicked walks into it instead.

Trouble is a reality of life which the righteous and wicked will encounter. The trouble that will confront the righteous will not overcome them. They will be delivered from trouble, because they will avoid being engaged in any conflict. Their ability to keep away from trouble will be due to God restraining them from walking into it. The wicked, on the other hand, walk into trouble because this is what they readily indulge in doing. The consequence of them engaging in trouble is that they will not be delivered from being harmed.