"...if I want to save these variables to a text file, would it be something like this?"
save ('variables.txt', x, y)
Nope; that form will save a .mat file which is unformatted, not text. It also won't work because the functional form of the save function must specify the variables to be saved by character strings.
save('variables.txt','x','y','-ascii')
would be the form required.
save/load are far more suited to .mat files than for text; I recommend strongly against it for the purpose. Use csvwrite or one of the multitude of other specific functions for the purpose instead. Use
help iofun
and look through the list for various choices and choose something appropriate to the need at hand.
As for what they're for, if you have need to save data in a form that can be read by humans, that's the logical choice. This can, of course include automated editing or as input to other programs that require text/ASCII files or the like.
However, for simply saving data to be recalled later or for lossless transport between systems stream files (often callled "binary") are far more concise and quicker. For data staying within Matlab then as noted above the .mat file has much to be said for it.