Look up the following in the manual:
magic_quotes_runtime (configuration)
magic_quotes_gpc (configuration)
get_magic_quotes_gpc() (function)
get_magic_quotes_runtime() (function)
And yes, the addslashes() and stripslashes() functions are used in this context.
If magic_quotes_gpc is turned on, all incoming text from forms will be escaped with backslashes to that you can run it right into MySQL without causing the flux capacitor to overload and knock you back to 1885.