IMPORTANT PSA: If someone that you don't know says to login to that random Apple ID on your device, DO NOT SIGN IN TO THAT RANDOM APPLE ID ELSE THEY WILL VERY LIKELY PUT YOUR APPLE DEVICE INTO LOST MODE FOR RANSOM!
If you or someone you know has fallen to this, you might be able to get out of it as long you have the original purchase receipt for the Apple device from the retailer that you've originally purchased the Apple device from. If so, contact Apple ASAP at https://support.apple.com/contact