The cell maintains its internal environment by the process of HOMEOSTASIS.
Homeostasis is the process by which living cells keep their internal environment constant. Maintaining homeostasis is very important because the survival of the living organism depend on it; a cell which can not maintain constant internal environment will die.