Definition
To behave in a way that is very likely to cause problems or difficulties for oneself.
Asking for a raise when the boss is in a bad mood is just looking for trouble.
Yelling at people in that bar is definitely looking for trouble.
If you don't follow the rules, you're just looking for trouble.