If you want to use the Ethereum testnets Goerli and Sepolia, head to Settings > Advanced, and make sure 'Show test networks' is turned on:
Once this setting is turned on, switch to a testnet by heading to the network selector at the top of the homepage and scrolling until you find the one you need:
If you're using MetaMask Mobile, testnets are listed in the network selector by default.