If there's enough access to be loading profiles—and this device is not associated with a corporation or some other organization and an IT team managing the device—then the device passcode or the Apple ID passwords or other such have been compromised.
Back up your iOS device using iTunes, use DFU to wipe and reset the contents, and then reload your iOS device from backups and from the Mac App Store. This will also update your iOS version to the most current; with current devices upgraded to iOS 12.2 as part of the reset and restore.
Reset your device passcode and preferably to six digits numeric or to a password, and reset your Apple ID password, reset your social media and other passwords, and reset the passwords on your mail accounts.
Enable multi-factor authentication on your Apple ID, and on other critical accounts.
If this iOS device is associated with an organization or a corporation, check directly with the IT folks that support the iOS devices for further assistance.