If you close your Microsoft account, there's a 60-day grace period during which you can change your mind and reopen your account. After 60 days, your Microsoft account will be permanently deleted. See How to close your Microsoft account for more info.
Reopen your Microsoft account
Go to account.microsoft.com and sign in.
You'll be asked to receive and enter a security code. After you enter the code, your account will be reopened. Subscriptions, profiles, and content that were on the account prior to closing will be available to you, including rewards points, Xbox profile gamertag, Gamerscore, and purchased content.
Any time remaining on your subscription will be available to you, but you won't get back the time that passed while your account was pending closure.
If you cancelled any subscriptions outright, or if your subscription time has run out, you'll need to repurchase the subscription.
If you cancelled any other associated subscriptions or services prior to closing your Microsoft account, you may have to reinstate those subscriptions. For more info, check the websites where you originally purchased those subscriptions or services.