Leftovers need to go in the fridge as soon as they're cool enough and definitely before two hours are up.
When reheating leftovers, you need to make sure they're reheated thoroughly so that it's steaming hot right through to the middle. The best way to ensure evenly heating food is to stir frequently, especially when using the microwave. Food will also cook more evenly in the microwave when covered, so cover with a suitable lid or microwave-safe plastic wrap (but don't let the wrap touch the food). And make sure you leave food for the recommended standing time after reheating in the microwave, as the food is still cooking.