In the easiest terms I can put it (this is general information only, and not medical advice):
A blood clot (usually occurs in a vein, unless you have an underlying clotting disorder, or pre-existing artherosclerosis, and some other conditions) occurs in the context of the following:
1. Vascular/extremity injury - trauma/surgery/vasculitis, etc.
2. Venous stasis - i.e. immobility after a surgery
3. Hypercoagulability - This is mostly intrinsic, but there are some things that can increase the risk of this, such as smoking, some medications, cancer, and others.
Clots that are provoked (i.e. secondary to a trauma/surgery) usually start in the lower extremities, and can migrate to the lungs where they become a pulmonary embolus (PE). This can be quite dangerous if untreated.
Therefore, anticoagulation is usually given prophylactically (to prevent a clot) to patients who undergo lower extremity orthopedic surgery. Xarelto is an oral version of an anticoagulant that targets factor X (that is 10, not the letter X) of the coagulation pathway, and is prescribed for a duration to a surgeon's/internist's decides post surgery.
If you want to discuss your risk for experiencing a clot, it would be good to talk to your surgeon or another physician involved in your care.