https://www.youtube.com/watch?v=5pIVVpoz5zk
It is the same as humans learning from art to imitate one or multiple other artists' styles. The differences are in scale, and flexibility in mixing and matching different styles (a very primitive, not-very-accurate model or description would be a vector of [0,1] values, one for each artist[1]), and which vector an AI art program happens to use as a default style for any prompt that doesn't specify something akin to "in the style of <x>"
[1] I'm not claiming these neural nets are learning models of each artist and linearly combining them, but if you squint hard enough it approaches that.