If your pc has a Windows 7 COA sticker then use the product key to activate Windows after board replacement, if it does not automatically activate.  Windows already installed on hdd will adjust to new motherboard.
I have a Dell Optiplex 790 (Mini Tower) and I'm replacing the motherboard with the same type what are some things I need to know for example when I replace it will it work just fine and ready to go or do I need to buy windows again or do anything before replacing it. Edit I found out that I have a retail version and not a OEM as I thought and I say this because this computer wasn't originally mine I've obtained it from a failed business... I think.  
Motherboard Replace