That's a battery grip. It serves a few functions. First it holds 2 batteries (at least for most models) and therefore increases the number of shots you can get without changing. Also improves the ergonomics of the camera, especially for people with big hands by effectively making the camera body bigger. Finally most of them incorporate a second shutter button and adjustment wheel for more comfortable shooting in the portrait orientation.