This depends entirely on the nature of your building project and whether it encroaches upon your day-to-day living space. However, it is not always necessary to move out for house extensions, garage and loft conversion.
Your building contract should state that it is your responsibility to keep all children and animals safely away from the building works.
A good builder will ensure that the site is left clean and tidy every evening but you must remember that this is a place of work and there is likely to be mud, dust, dirt, machinery, holes in the ground, electrical wires and dangerous equipment on site. Life will feel quite a bit different until the job is finished, so you need to prepare yourself for at least a little disturbance.
Most homeowners can find a way to live alongside the building work, that is until the bathroom or kitchen is being replaced. Then is probably a good time to take a holiday or, perhaps, stay with friends or family for a few days until the toilet and water supply are reconnected.