man, i wished i found this thead earlier.. got my device hard-bricked because of incorrectly installing TWRPYou should follow the steps under
"Installing with TWRP: (ROM Type: Recovery)"
from the MIUI.eu page
Honestly, it's not easy to explain it any better than that post, there's also a guide on how to install TWRP
Note: you must have the bootloader unlocked. If it's still locked, you will lose all your data unlocking it