Stress concentrations are due to abrupt geometrical changes that cause the flow of stress to concentrate (
visualize stress contours tightly packed at the discontinuity). From a theoretical scientific point of view, these stress concentration factors can be calculated using elasticity theory and plate analysis and a lot of messy partial differential equations. Or by computer finite element approach (caution, this sometimes leads to infinities).