Outlets can malfunction because of something as simple as a tripped circuit breaker or GFCI, but it could be more serious like a poor connection or a surge that has literally burned it out. If your outlet sparks and has black marks around the outlet plug, do not use it. Call a professional to inspect the incoming wires and replace the outlet.