Magic quotes is a configuration setting within PHP that means that all data containing a single or double quote, or NULL, will automatically be escaped with a backslash before being entered into a database.
You will need to know whether the setting is on or not so as you can process data correctly that is going into or coming from a database.