Angel - If this is the same principle as a boiler I had in a flat many years ago then the issue actually may not be the boiler but a control valve.
On the understanding that I am no expert - Basically a boiler only heats water one way, I.e. cold water comes in one end, gets heated and goes out hot at the other. It does not care where the water goes, it can only do the same thing for the water destined for heating or hot water.
To get the boiler heated water to go where you want it, I think there should be a motorised control valve that rotates sending the new hot water either to the heating, tank or both up different pipes. Over years these valves can start to jam or the motors can die and they need repair / replacement.
In my case the valve is on the pipe where hot water comes out of the boiler but it can also be near the tank and not be boiler. I do not believe there is a hard and fast rule. Being very very careful it may be possible for the average person to test the hot pipes with a protected hand to give clues to the location of the valve and if it defective. I.e. if you only have the hot water turned on then the valve should only allow one pipe beyond it to get hot, not both.
To me this is a plumber job and not something to hit with a tapping stick (hammer).
Longer term it may be worth cleaning out the water in your system and putting inhibitor into the system to prevent the formation of limescale in the pipes that could damage the system.
Good luck