Apportionment, aka reallocating congressional seats, occurs every 10 years following the census. The census collects data on the population.
Due to The Great Compromise, the House of Representatives is based on population. This is done to more accurately represent the people.
The number of seats in the house is set at 435. Following the census, if an area increased in population enough then it will gain seats, but if it decreased enough then it will lose seats. If they lose a seat then the incumbent no longer holds that position because it no longer exists.
House of Representative members are elected every even year. Apportionment doesn't kick anyone out of office because they finish out their term, but they will have to run for a new office as theirs no longer exists. It doesn't necessarily "replace" the congressman because they have to be voted into office.