I'm looking into buying my first microphone, and I've (basically) decided on a used SM57. It comes with a standard cable (I'm guessing XLR to XLR), however, I'm wondering how to record various sound effects with the microphone. It would be better to have it be portable because I can't record all of my sounds on my computer. Is there some sort of cable to use with my phone? Or is the only practical way to go about it by paying for an audio interface and hooking it up to my computer?
You need a portable / field recorder with an XLR input in order to use the mic in the field, to record sounds. There are many different makes and models out there, discussed in many threads on this site such as here. At the mid/low tier I personally would recommend a Tascam DR-100 MkII.
May I ask what made you to decide to use a Shure SM57? It's a dynamic mic, which is usually best suited to micing up live performances, rather than being used as a field recording mic. For field / sound effects recording, a shotgun condensor mic, such as the Rode NTG-1 or NTG-2 might be a little more suitable and in a similar price bracket.
A Shure SM57 is not very suitable for recording Foley sounds. A condenser microphone is much more typical to use for recording ambient and natural sounds and Foley/SFX (sound effects).
A "sleeper" product I have found is an ISK "Little Gem" condenser microphone. It comes with omnidirectional, cardioid, and hyper-cardioid microphone heads which you can select to suit the particular recording situation. There are other similar budget-price reasonable quality condenser microphones.
If you want to record a professional-grade XLR microphone on a smart phone or similar gadget there are XLR microphone preamp gadgets which implement such connections. For example IK Multimedia iRig PRE.