Firstly we need to know what the overflow is linked too.
If the overflow is popping out near the roof it'll be either the cold water storage tank (CWST) or the feed and expansion tank (F&E) in your loft.
If the overflow is popping out of the bathroom it will be your toilet cistern.