How to flush all the water lines in your house
You could just run the water for as long as you think it would take. Probably would have to run the hot until the water runs cold, then a little longer. This would basically ensure the water heater is cleared and the piping before it. The cold wouldn't have to be ran as long, but your goal is to still clear the pipes out.

The best way to know that you've got all new water, and flush the house; is to shut off the main valve and then go to the lowest operable plumbing point in your house.

Like my water heater is in my basement and it's drain valve at the bottom is the lowest point in the house as the main water line comes in above this. So, because of gravity, most of the water in the house would drain out of this. If your heater isn't the lowest though, just search for the lowest drainage point.

Again just shut off the main valve so no new water will enter the system yet. If you go the route of through the heater, make sure to flip it's breaker. Go turn on all sink handles too, both hot and cold, so that air can be brought into the piping and released when the water comes back on.

Once it stops draining, your house is now 90+% empty. Close the valve back, (flip the heater's power back on), and turn back on the main water. You'll hear rumbling and such from the sinks that you opened as the air clears the lines. Once the water starts flowing from them like normal and there are no more sounds coming from the pipe, you're clear. You could run them for another minute or two (take a cold shower) for that last little bit of water that could have been left in the pipes.

This doesn't work any better than just running the water for an hour or however long as far as cleaning the system, but it could save you some water and you'll know when it's done.

Last, if the home or plumbing supplies are older, you might have flakes of rust and such from your pipes show up in the aerators or the sinks. Might not, but just remember this in the possibility that you're getting low pressure afterwards.