Sign in to your Xbox One (make sure you’re signed in with the Microsoft account you want to redeem the code with).
Select the Microsoft Store app from your Home Screen or search for it.
Scroll down to "Redeem Code" (on the left-hand side (under your account name).)