Promptly cleaning up spills and avoiding wearing shoes on carpets can help prevent stains from forming