We prove that if 0<\a<1 and f is in the Hölder class Ł\a(R), then for arbitrary self-adjoint operators A and B with bounded A−B, the operator f(A)−f(B) is bounded and ∥f(A)−f(B)∥≤\const∥A−B∥\a. We prove a similar result for functions f of the Zygmund class Ł1(R): ∥f(A+K)−2f(A)+f(A−K)∥≤\const∥K∥, where A and K are self-adjoint operators. Similar results also hold for all Hölder-Zygmund classes Ł\a(R), \a>0. We also study properties of the operators f(A)−f(B) for f∈Ł\a(R) and self-adjoint operators A and B such that A−B belongs to the Schatten--von Neumann class \bSp. We consider the same problem for higher order differences. Similar results also hold for unitary operators and for contractions.