XMPP is a free (as in freedom) instant messaging protocol that has been around since 1999.
Since XMPP is a protocol like IRC or e-mail and is not a centralised service like Discord or Telegram you cannot be shut down and scattered by a central authority such as a group of admins, or some silicon valley company.
It is secure, open and is available through a wide variety of services that do not require personal information. You could even set up your own server.
XMPP features encryption in 1-to-1 conversations, with experimental encryption in multi-user-chats (MUCs), file transfer via HTTP (or external site such as 0x0.st or lainsafe) and audio/visual calls among others. "eXtensible" is the "X" in "XMPP" so it is richly developed and deliberately so. Along with a suitable VOIP substitute it can serve in a full replacement to bad IM services like Discord, WhatsApp, or Telegram.
A friend of mine wrote a great article about Discord and why you should stop using it here, and the Spyware Watchdog also has an article about it here for those more concerned with privacy.
Reputable services include Snopyta, Hot-Chilli/jabb3r, yaxim, and NixNet.
Many clients are available, this being one of the perks of an open standard. If you want one that just werks™ then conversations is a pretty good start, although to get it for free you have to use the F-Droid repo. It has numerous forks, one of which is the blabber.im app, available on F-Droid and the Play Store. It has added features and has been changed to have a more similar UI to mainstream apps such as WhatsApp, so if you're switching you'll feel right at home.
For desktop use, you have a few choices: