Do the colorful pictures of the universe show how it looks like that in reality or is it just a visual effect that is added later.
There is no straight yes or no answer.
Some objects do have significant radiation in visible part of the spectrum which would make them colorful if we would be close enough while observing them (our eye needs large number of photons to distinguish color so that means, astronomy wise, that object needs to be either very bright or very close or both).
On the other hand lot of them are being adjusted for color later. Usually most beautiful images are mosaics of several images from different filters (even from parts of spectrum our eye cant see) where each image is given a specific color based on filter used and then later all of them get combined.
If you want to learn more check this very helpful paper, which has some tutorials as well:
Btw, as a curiosity - images from rovers on Mars are mainly black and white and are colorized later (thats why the rovers usually have a color wheel on them for calibration purposes as seen here). This lead to uncertainties of color of Mars sky which turned into a long lasting debate.
Many astronomical objects are too dim to be easily seen. There is no place in the universe where M42 (between Orion's legs) would look to the naked eye like it does in photos: it is too dim, and our eyes are not good at detecting colour of dim objects.
Unlike a regular camera, which has pixel detectors for red green and blue light, most coloured astronomical images are made by using a sequence of filters in front of the camera lens. The filters only let a particular colour through. The result is several greyscale images, when several images have been made of the same object, they are mixed together, by assigning a colour to each. So "red" may represent infrared, for example, a colour that cannot be seen by humans. The assignment of image colours to filters is called a pallet, and can make a big difference to the appearance of an image.
The Hubble images of "the pillars of creation" popularised a particular pallet, and Hubble site has some details on how they create the colours in images. The hubble pallet uses "blue" for a mid range filter, yellow green (this colour is produced by oxygen ions), "green" for and orangy red filte: it picks up the light from hydrogen ions, and "red" for a intense red, fading towards the infra-red (sulphur). By using "false colour" details of the distribution of ions can be picked out better, and it makes a more attractive image.