Justification is a way to align text, where both the right and the left edges are even. Justification is one of 4 alignment types: flush left, flush right, centered and justified.
Justification is commonly used in print media, it's a newspaper style. Books are also aligned in this way. It makes sense to use justification when you can control every line and where is a lot of text: books, newspapers, and magazines. The first printed books were aligned particularly neat.
Layout programs like InDesign help you align text and set up justification. But to make a good text layout, it is not enough to just click a button in the program. In some cases, the text still have to be aligned manually and with the help of editing.
Avoid justifying text when readability suffers. Spaces should not differ much from the standard width, letters should not be separated or stuck together, hyphenation should not be too much.