Your plumbing system is all connected. You might be aware of this fact, but sometimes you are given a direct reminder that this is the case. For example, have you ever experienced taking a shower only to notice bubbling coming from your toilet. This is called venting, and it is due to air being pushed out through the closest available exit. Your plumbing needs to vent somewhere, and usually this happens through a vent pipe. If this pipe is blocked for any reason, it will cause the phenomenon we just described.
How do you fix this problem? The blockage needs to be removed. It could be that a bird or some type of rodent decided to nest inside of your vent pipe. Once you clear that out, your plumbing should be venting fine again.
It is also possible that there is a blocked pipe somewhere else in your plumbing causing this to happen. Sometimes, this can be resolved using a plumbing snake or a plunger to dislodge the clog, but if this doesn’t help, you might need to contact a plumber.