Picture straight ripples rolling across a pond toward a wall with a gap in it. If the gap is many wavelengths wide, most of the wave goes straight through and leaves a fairly sharp shadow on either side. Shrink the gap until it is about one wavelength wide and the wave coming out is no longer a strip: it spreads in semicircles from the gap, as if the gap were a new source. At a single edge the same thing happens on a smaller scale, and the wave curls a little way into the shadow.
What decides the amount of spreading is the wavelength compared with the gap. Speech has wavelengths from about 0.3 m to 3 m, similar to a doorway, so voices fan out into the hallway. Visible light has wavelengths around 500 nm, more than a million times smaller than a doorway, so it passes straight through and you cannot see round the corner. For a single slit of width a, the first dark direction on each side is at sinθ=λ/a. Halving the slit width doubles sinθ, so the pattern gets wider, not narrower.
Refraction also changes a wave's direction, but for a different reason. A straw looks bent in a glass of water because light slows down when it enters the water: the wave has changed medium. In diffraction the wave stays in one medium at one speed and spreads because part of its front was blocked. A boundary between two materials points to refraction; a gap, slit, edge or obstacle inside one material points to diffraction.
Think of it like this. A gap in a barrier acts like a pebble dropped right at the gap: ripples spread out in circles behind it. The narrower the gap, the more it behaves like a single pebble and the more fully circular the ripples. A wide gap acts like a row of pebbles whose circles merge back into a straight front.
Core idea. A wave spreads out after a gap or edge by an amount set by the ratio of wavelength to gap size: similar sizes give wide spreading, while a wavelength far smaller than the gap gives an almost sharp shadow.