If your drill has a brushed motor, it's totally normal to get some sparks. These sparks should be consistent and relatively contained inside the drill. However, if there are intermittent and violent sparks around the motor, power cord, or battery compartment, this is a sign of an issue that must be repaired.
Also, Cordless drills will spark normally within the drill itself as the carbon brushes pass by the commutator. These small sparks are a normal part of the cordless drill operation.
If you have a brushless unit, you'd need to get in contact with the nearest Factory Service Center or Authorized service center listed here.