Neural networks, specifically Convolutional Neural Networks (CNNs), are used in DeepDream and other ‘deep art’ techniques to produce images. The process involves feeding an image through the network, calculating gradients to identify areas of high activation, and then modifying the image to further amplify the patterns and features the network recognizes within it.