My computer has a rootkit of some sort and the attacker can see everything that I do on it. I need it to do something related to banking, so I have to secure my computer first. I have a CD of windows 7 (64 bit), but when I would format my computer and install Windows anew, can't the attacker gain access to my computer because of my static IP? What should I do?
Having a static IP has nothing to do with you getting hacked. Running a vulnerable configuration does. I would reccomend you reinstall your system without connecting it at all to the internet and then at the very least making sure you're behind some kind of reasonable NAT or firewall (most home routers qualify for basic protection there) and immediately running windows update until it won't give you any more and enabling windows firewall.
By analogy, plenty of people know where I live. That doesn't make it easier for them to get in my house.
If your machine comes up with an IP address that doesn't start with 10., 172.16-32, or 192.168 then you're certainly a naked windows machine running around with your pants down.
Your static IP isn't really a factor except that the attacker knows where to find you, and will almost certainly try the same attack again (assuming it was a remote exploit rather than user error / trojan).
For banking and whatnot I would recommend a read-only live boot CD or USB drive (CDs are more reliably read-only, but also less common today). There are myriad Linux live distros, including the original Knoppix but also the Install CDs for common distros like Ubuntu can run in a "Try before you install" environment which is more-or-less guaranteed to be exploit-free. Assuming it's not modified along the way between here and there.
Since these can't be modified, a simple reboot gets you back to the original state, and once again clean.