When dealing with combinatorics of words, saying "a consecutive pattern in a word" is a fancy way of saying "a subword". For permutations, it becomes more interesting: a permutation w occurs in another permutation v as a consecutive pattern if v contains a subword which is order-isomorphic to w. It turns out that both these topics can be embedded into a common framework of pattern avoidance in trees. I shall give an elementary introduction in those topics, formulate some open problems, and explain why studying these questions is natural for someone interested in algebra and algebraic topology. I shall also briefly outline a method allowing to approach questions of enumerative combinatorics for permutations using homological algebra.