Such boxes often appear when you activate any of the accessibility functions. For example, a square gray box may show up on the iPhone screen, including options like Home, Siri, Notification Center, etc. This happens when you activate an Accessibility feature called Assistive Touch.
