There's more than one possibility
As Steve said, the plumbing may not be "factory original"...so you're gonna have to find out for yourself where the hoses go by tracing them (something every boat owner should do ASAP after buying a boat anyway ...an emergency is NOT the time to START looking for y-valves and thru-hulls!). A y-valve that offers a choice between flushing directly overboard and going into the tank is usually fairly accessible, so it shouldn't be too hard to find if there is one. However, if waste is coming out a thru-hull fairly high on the hull, it prob'ly means that waste is going into the tank but the tank is full and waste is overflowing out the tank vent. Or, you may not have a holding tank--or if you do, the toilet may not be connected to it. but only flushes overboard. So...there's only one way to find out how your sanitation system is plumbed and what's happening: start exploring your own boat.