When a mobile device is to be made available for a different user, that is when handing back iPhones or iPads at the university or if disposing of or selling on personal devices, Apple mobile devices need to have the user's iCloud details removed so that devices can be wiped, reset and subsequently be reused by the new user.
To begin, on your device/s open settings then navigate to General and click about and make a note of your device's name. Power down the device.
On another device navigate to the following address: -
Log on to this website using your AppleID (usually an email address) and password
Once logged in click 'All Devices' link at the top of the screen, a drop-down menu will appear with the list of devices associated with your account,
Select the device from the list of devices by choosing the name that you looked up in step 1,
then select the 'Remove from Account' link,
then click on Remove in the popup window that opens.
You will then have to re-enter your password to remove the device from your account.
Click on "All devices" again to confirm that the device has been removed from your personal iCloud account.
To confirm that the iPad has indeed been unlinked from your iCloud account, log out and then log back in at https://www.icloud.com/#find
Check on ‘All Devices’ to confirm that the iPad or iPhone is no longer listed.