what happens to the data in my hard drive once i upgrade a motherboard

Solution
It will not delete itself. However switching motherboard usually requires reinstalling OS, and you can delete the drive contents at the drive choosing phase of install.