What general rules do I need to follow to keep my food safe? How do I know what temperature to cook something to, or whether my food is safe at room temperature?
More on Botulism from http://www.uga.edu/nchfp/publications/nchfp/lit_rev/cure_smoke_fs.html
The majority (65%) of botulism cases are a result of inadequate home food processing or preservation (CDC 1998). Botulism results from ingestion of a toxin produced by the bacterium C. botulinum.
This bacterium requires a moist, oxygen-free environment, low acidity (pH greater than 4.6) and temperatures in the danger zone (38-140°F) to grow and produce toxin. C. botulinum forms heat resistant spores that can become dangerous if allowed to germinate, grow, and produce toxin.
Sufficient heat can be used to inactivate the toxin (180°F for 4 min., Kendall 1999). C. botulinum thrives in moist foods that are low in salt (less than 10%), particularly when they are stored at temperatures above 38°F.
These organisms will not grow in an aerobic environment, but other aerobic organisms in a closed system can rapidly convert an aerobic environment to an anaerobic environment by using the oxygen for their own growth, permitting growth of C. botulinum.
The FDA regulations have a lot of good information about cooking times for pork (scroll down a little in that link for the table). Basically, to kill everything off, you need a temperature and a time at that temperature. For pork, even 120F is safe if you keep it there for 21 hours.
Do be aware that all the meat needs to reach that temperature before the counter starts.
Storing food: the danger zone
When food is between 38°F and 140°F (4°C and 60°C) it's considered in the danger zone, and bacteria are growing on it quickly. USDA guidelines say that no longer than two hours in the danger zone is acceptable. This applies to anything that should be refrigerated, including raw meat and cooked food (leftovers). Additionally, if it's over 90F (32C), they reduce the guideline to just one hour.
Killing pathogens: cooking temperatures
When cooking meat, cook it to the recommended temperature for that particular kind of meat. See for example the USDA's temperatures for various meats. These are conservative guidelines, but they'll make you safe.
Different meats have different potential hazards. Most bacteria is killed by heating it over 145°F (63°C), but some things are much harder to kill, so it's important to use the appropriate temperature for what you're cooking.
And of course, once it's cooked, there may be some things that survived, or are reintroduced to the food, so you still have to follow the two-hour danger zone rule above.
Even if the bacteria is dead, toxins can remain if the food was out too long, causing problems. No matter how thoroughly you cook something, it won't make up for bad handling. (Also asked and answered here). For more details on killing bacteria and the hazards of the toxins they leave behind, see the many answers to this question.