If your iPhone 6s becomes stuck in headphone mode and the screen becomes unresponsive, you can force the device to
restart.
To force a restart, press and hold the Power (Sleep/Wake) and Home buttons at the same time until the Apple logo displays, then release both keys. Wait until your iPhone has completely rebooted before checking to see whether it has already returned to regular mode.