I sprained my foot 1 week ago. Should I use heat or ice?

Probably ice. If your foot is still swollen after a week you really should be examined and xrayed to rule out potential fracture. Assuming the xray is negative i would probably still use ice for 15 minute intervals to help decrease swelling.
Heat. The rule of thumb is to use ice for the first 72 hours and then switch to heat.