Check that you have the latest software on your Mac or Windows PC.
Make sure that your device is turned on.
If you see a Trust this Computer alert, unlock your device and tap Trust. If the alert continues to appear, you might need to reset your lockdown folder.
Unplug all USB accessories from your computer except for your device. Try each USB port to see if one works. Then try a different Apple USB cable.