You may think of boundaries as being what you feel comfortable with in terms of your actions but boundaries are as much about what you are willing to let into your life. Understanding what your boundaries are and how you are affected by the world around you is critical to your well-being and to be able to establish healthy boundaries.
Let's imagine you are in a relationship with someone and you both have stressful jobs but your partner comes home every day and needs to "vent" about their work and the horrible people that they work with. As they are talking they are very heated and emotions are running high (the last thing you want when you are trying to relax and unwind after a long day). Maybe this venting makes your partner feel better, and they can sleep soundly but after listening to an hour of this every night you are not only exhausted but you feel like you can't wind down and so you find yourself staring at the ceiling unable to sleep. You don't know what is wrong, you are being supportive of your partner, who is experiencing stress at work. What else would you do...You find that you are feeling resentful and waking up angry in the morning and you realize you are not okay.
This is a sign that your boundaries are being violated.
In the scenario above, the discomfort is coming from the fact that a boundary is being violated. This does not make either partner "bad," it just means that they have different needs. Ideally, the one partner needs to communicate how they are feeling to the partner who has been venting and needs to set a boundary. There is a simple formula for communication that often works ( When you, I feel, I need)
It could look something like:
When you vent to me after work late at night,
I feel anxious and overwhelmed,
I need to have time to myself at night to decompress /for us to limit work-related discussions to the weekend/for you to talk to someone because I can't take it all on myself if we are going to have a healthy relationship
It is also important to remember when you set a boundary, you should expect that you will have to reinforce it.