They do not actually thin the blood. Anticoagulants such as warfarin are used to help prevent harmful blood clots from forming. You're more likely to get blood clots if you have heart failure
because your heart's pumping action is weaker causing the blood to pool in the body. Blood clots can block narrow blood vessels and stop blood getting to parts of your body. If blood can't get to your brain, this can cause a stroke. Your doctor will consider your risk of having a stroke before prescribing you anticoagulants.