It's a bit subjective but actually not that critical.
40 degrees Celsius is about as hot as you can comfortably put your hands in, but as you're probably using rubber gloves, it won't be a problem.
The heat helps to expand the fibres to let the dye in deeper and the longer you leave it the deeper the colour.
The temptation is to take it out too soon, because the fabric looks darker when it's wet.
When you next wash the item. it's likely you'll lose some colour, unless you use a cold wash. Either way, do it on its own, for the first few times.