Anticoagulants can help prevent heart attacks, strokes and other problems. The number of medicines you take, the way you take them, how well they work and the length of time they work depend on which medicine you take.