It calls both. onPause() will be called before onStop(), if onResume() was called. Rougly speaking, onPause() is called when activity is partially hidden, and onStop() when it is fully hidden.
Read up on http://developer.android.com/training/basics/activity-lifecycle/index.html to understand the Activity lifecycle.