How quickly you recover from an ankle replacement will depend on your health, how the surgery went, and if there are any complications.
In general, if you are relatively healthy and the surgery goes well without any complications, you can look at being discharged from the hospital anywhere from a day or two after surgery to a few days. You will likely have been seen by a physiotherapist to show you what types of exercises you should do for your ankle.
These exercises and following instructions about what you can and cannot do are vital in your recovery. You should not overdo it and cause stress to your ankle, but you should make sure to do as much as has been suggested by your physiotherapist.