AT command and API

I want to know difference configuring xbee with AT command mode and API mode. How one differ from other method? plz help