What makes you think this has happened? If somebody tells you that in an email or message then it is more than likely phishing.
Read this document if you think your Apple Account has been compromised. --> If you think your Apple Account has been compromised - Apple Support
Use the information in this document to check your Apple ID device list to find where you're signed in --> Check your Apple Account device list to find where you’re signed in - Apple Support
Related materials:
Personal Safety User Guide
Personal Safety User Guide - Apple Support
> open the Table of Contents and review the articles
A document with general information about security and your Apple ID --> Security and your Apple Account - Apple Support
Contact Apple for help with Apple ID account security. This page provides country-specific Apple Support contact information ➞ Contact Apple Support - Apple Support