Close combat casualties are removed in the same way as shooting casualties. Although casualties fall amongst the rank that is fighting, models in the rear ranks will step forward to fill any gaps that appear. Casualties will therefore be removed straight from a unit's rear rank.
It is a good idea not to immediately remove models that fall casualty but instead temporarily place them next to their unit. This is because when it comes to working out who has won the combat you will need to know how many casualties have been caused this turn. Also, models that are removed before they have had a chance to attack may not do so, and models that are stepping forward from rear ranks to replace them can't attack that turn. This means that any casualties inflicted will reduce the number of enemy left to fight back. You need to know how many models were killed that combat round to determine who cannot attack back.