Once you reach 5000 trophies, you can sign-up for Legend League. You are automatically signed up for consecutive Legend League seasons, but only if your trophies stay at 4,901 or more.
If your trophies drop under 4,901, you have until the end of the current League Day to get back to 4,901 Trophies or higher. At the start of each League Day, anyone who has signed up and is below 4,901 Trophies is demoted to Titan league. In this case, you will have to get back to 5,000 trophies and sign-up for Legend League again.
Should you not sign-up for the Legend League game mode, you can not attack anymore. Players in Titan League can still attack you.