An understanding of the basic rules of composition is helpful in forming a foundation, however the best way to learn composition is by viewing really good work. Paintings, photographs and drawings can be a clue as to how to employ the rules of composition and how to break them. Ultimately it's the breaking of the compositional rules that can lead to the most interesting compositions.