The most important thing is to access your router's control panel as soon as possible. Usually you just need to type the router's IP address into your browser's search bar (it's often 192.168.1.1 or 192.168.0.1), enter your login credentials (check the manual or the back of the router if you don't know them), and then look for a section called "Connected Devices" or "Client list". There you'll see all the devices connected at that moment, with their MAC and IP addresses. If you see devices you don't recognize, that's the sign that someone has connected.
Once you've identified the intruders, the next step is to change your Wi-Fi password to something more complex and secure - use uppercase, lowercase, numbers and symbols. If you see a lot of unknown devices, also consider updating your router's firmware if there's a newer version available, because it could patch security holes. Many routers also have the option to use a separate 5GHz network from the 2.4GHz one, which is less crowded and faster for your main devices.
In the meantime, if your connection continues to be slow even after you've blocked the intruders, the problem might not be just that. Sometimes your internet provider has issues on the line, or the router is positioned badly in your house (surrounded by thick walls it slows down the signal). If you're sure no one is connected and the speed is still terrible, contact your internet provider to have them check the line.