Custodial and non-custodial wallets
What is the difference between having your crypto on an exchange compared to having it in a wallet?
The first terms we have to differentiate are custodial and non-custodial wallets.
Custodial wallets are basically all wallets that are managed by entities other than you. The best example are exchanges like Coinbase, Binance, and Uphold. If you buy for example XRP on an exchange you usually won't get your own wallet address nor does it change the state on the blockchain. You are just assigned an internal IOU by the exchange (which is managed in their database) and your crypto is being managed by the exchange. If you want to withdraw crypto you are sending a request to the exchange which will be first audited (usually automatically) by the exchange and then they submit a command (payment) to the blockchain to fulfill your request. That's the reason why there is always a delay when issuing a withdrawal request and the technology is faster. If you withdraw XRP from Binance it takes longer than 3-5 seconds until the withdrawal is complete. The reason for that is mentioned above.
You have a point of contact which you can alert if you have some issues or if you lose access to your account. They are able to help you out. Sometimes exchanges have also built-in safety mechanisms to first check, when a user tries to withdraw crypto, the destination address and find out if the destination is maybe a proven scam. If that would be the case, the exchange can intervene and deny the transfer request in your own interest.
The problem is that you are basically blindly trusting that entity to make sure that they are not hacked (otherwise you could be subject to losing, some or even all of your crypto) and that they are not acting maliciously. You own crypto but basically, you still have a single point of trust. That's why when you intend to have your crypto managed by an entity you should make sure that you trust that entity. It might be also wise to trust entities that have proven to be trustworthy and which are also residing in your country.
Non-custodial wallets are wallets (either Software or Hardware) wallets that let you manage your crypto and interact with the blockchain network directly. Beware that there are some software wallets that are still custodial. With non-custodial wallets, your master password is a (mnemonic (12,16,24 words), Family Seed, or a number matrix).
The mnemonic is something commonly used for many different cryptos. The family seed and number matrix are XRP specific.
Your crypto is 100% safe and nobody except you are able to manage it. The only person you are trusting is yourself to not light-headedly give out your “master password”/mnemonic.
If you ever lose your “master password”/mnemonic you will never be able to access your funds again. Additionally keep in mind that you have to pay gas fees, which is normal, but for some cryptocurrencies like Bitcoin or Ethereum the gas fees can get very high.