It depends on the underlying pathology which is causing the heart murmur. For e.g. if the murmur is due to a damage to the heart valve, then it will remain the rest of the life if the valve is not repaired/replaced.
On the other hand, heart murmurs can also occur due to a decrease in hemoglobin, what we commonly refer to as anemia and such murmurs (called as flow murmurs) commonly go away if we treat the underlying cause i.e. anemia.
I sincerely hope that helps. Please do keep me posted. Kind Regards.