What a central bank says, as much as what it does, affects those expectations. Even more important are expectations of future inflation. When people expect prices to rise rapidly, they bring forward purchases, put up their own prices, demand higher wages and so on. That helps to create the very inflation they expect.
On the other hand, if people are convinced that inflation will be contained – perhaps because they believe that the central bank will do whatever is required to achieve that – they behave accordingly. In that case, their price setting, wage and purchasing behaviour helps keep inflation controlled.