When I save a contact on my mobile phone, is it stored directly on my SIM or on my phone?

You can control if your contacts are stored on the phone or on the SIM by changing the settings on your cell phone. The phones are shipped with default settings that are determined by your phone company, if that’s where you got your phone. Most if not all smartphones default to save contacts on the phone, but you can transfer your contacts to your SIM to save a copy of them there if you want.