Say I want to cook a piece of meat by putting it in water and bringing the water to a certain temperature. (In celsius please) how low can the temperature be for it to be still able to cook the meat? Does it need a boil, or can it be done with say 40 degrees celsius? And if so, how long does it need to be in the water for it to get done?
The answer depends on the type of meat as well as the thickness. There are different things you need to worry about killing in different kinds of meat, and it takes a different amount of time for everything to get hot enough for long enough depending on the thickness.
Note that you generally don't want to put the meat straight in the water, since you'll lose flavor into the water (unless your goal is to make broth or soup); you'll want to put it in a sealed bag in the water. This method of cooking is called sous vide. (Yes, that means "under vacuum", but you don't actually need vacuum-sealed bags; airtight with most of the air removed will suffice.)
The best single resource I know for this is Douglas Baldwin's "A Practical Guide to Sous Vide Cooking". There are tables for fish/shellfish, poultry, and beef, pork and lamb, as well as a lot of other great information. To give you a rough idea, the temperatures in the tables go down to around 55C, and at that temperature, the times cover a huge range, from 2 hours for thin (5mm) beef, pork, or lamb, to 9.25 hours for thick (70mm) fatty fish.
That 55C is the lowest safe temperature I know of. The government-published pasteurization time tables don't go below that. It's possible lower temperatures can work too, but you'd have to start digging into published papers.
Note that there may also be thickness/size bounds. Those tables only go up to 70mm so that's all I'm confident about. It's possible you can go even thicker, but I don't think you can go on forever. Eventually things will be sufficiently thick that the amount of time spent at too-low temperature in the center of the meat before it's totally heated up can't be compensated for by time holding it at a higher temperature once it's fully heated. This would be especially true if you try to cook anything that's not totally solid, since there's more contamination on surfaces than inside meat. For example, cooking a whole chicken like this doesn't sound like a great idea.
The primary concern here is cooking the food at a temperature that is above that of which bacteria can grow, and doing so for long enough to reduce the bacteria levels significantly (typically, at least a millionfold reduction in bacteria count).
From Doug Baldwin's "A Practical Guide to Sous Vide Cooking":
Most food pathogens stop growing by 122°F (50°C), but the common food pathogen Clostridium perfringens can grow at up to 126.1°F (52.3°C). So in sous vide cooking, you usually cook at 130°F (54.4°C) or higher. (You could cook your food at slightly lower temperatures, but it would take you a lot longer to kill the food pathogens.)
Thus, 55°C is a good baseline; 54°C might be okay (though Bacillus Cereus may grow a bit above that), but it would take a very long time at 54°C. Even 54.4°C takes a very long time:
in a 130°F (54.4°C) water bath (the lowest temperature I recommend for cooking sous vide) it’ll take you about 2½ hours to reduce E. coli to a safe level in a 1 inch (25 mm) thick hamburger patty and holding a hamburger patty at 130°F (54.4°C) for 2½ hours is inconceivable with traditional cooking methods – which is why the “danger zone” conceived for traditional cooking methods doesn’t start at 130°F (54.4°C).
At the more common 60°C, it takes much less time:
FSIS (2005) recommends a 6.5 decimal reduction of Salmonella in beef, so the coldest part should be at least 140°F (60°C) for at least 6.5D_60^6.0 = 35.6 minutes.
A common sense rule without having to look up your specific meat would be to cook to 60°C for an hour and a half; this covers you for all meat types and for up to 25mm thick pieces. Of course, if you prefer a lower temperature and/or thicker pieces of meat, look it up.
Note that it is possible to cook meat at a lower temperature; however, below 54.4°C it may not be pasteurized (meaning, the bacteria may not have been reduced to a safe level). Steaks are often cooked sous-vide at 50-52°C for those who enjoy bloody steaks, and when sourced from a reputable butcher, for example. However, in addition to being aware of the risks of doing so, it is important to ensure the meat is not cooked at that temperature for very long (more than about an hour), as it is actively encouraging bacterial growth.
Additionally, in responding to the comment on the other answer; as it would be inherently unethical to cook a living animal at these temperatures (which likely would eventually kill it, but would be incredibly cruel), I don't think there is an equivalent temperature guide. Certainly crab and lobster are commonly cooked by dropping a live animal into the boiling water; equally certainly, water slightly under boiling would still kill them, though at what point it becomes 'cruel' is up to the reader to determine (as many would argue that even boiling water is still cruel).
Also, most animals should not be cooked whole (without the guts/etc. removed); even aside from the issue of tissue density, the guts often contain pathogens.