Their are valves that operate constantly preventing such failures, but if you have obstruction, or irregular valve activity, can cause problems as valves not closing when they should, such as in heart murmurs and varicose veins. Often not serious, but if a problem is detected through an ultrasound there are non surgical remedies, i.e. Stockings for varicose veins in legs, or in extreme cases, surgery for the heart, called bypass
The veins are like little tube in your body the tubs keep the blood in side them and keep them from mixing
There is NO mixing of blood in the normal heart. There is free passage of blood from the atria into the ventricles in the normal heart.
However, the heart is not veins or arteries, it consists of 4 chambers (2 atria and 2 ventricles). They are separated by walls and valves. Assuming the valves are in good condition and not leaking, they and the walls prevent the blood from the atria from mixing with the ventricles. The blood is brought to the heart by the veins and leaves it by the arteries, but they are not within the heart itself.