Let me assume throughout this answer that $M$ is closed, oriented, and connected. Here are some necessary conditions.

If you ask for a smooth fiber bundle, then a necessary condition is that the tangent bundle of $M$ has a trivial quotient of rank $1$, or equivalently a trivial subbundle of rank $1$. This is possible iff the Euler class $e(M)$ vanishes. This gives

**Condition #1:** $\chi(M) = 0$ (automatic when $\dim M$ is odd).

Next, if $F$ denotes the fiber of $f$, then the long exact sequence in homotopy for the fibration $F \to M \to S^1$ takes the form

$$1 \to \pi_1(F) \to \pi_1(M) \to \mathbb{Z} \to \pi_0(F) \to 1$$

(and for $n \ge 2$ the maps $\pi_n(F) \to \pi_n(M)$ are isomorphisms). This gives $\pi_1(F) = \text{ker} \left( \pi_1(M) \to \mathbb{Z} \right)$. Since $M$ is compact, so is $F$, so $\pi_0(F)$ is finite. It follows that $\text{ker}(\mathbb{Z} \to \pi_0(F))$ is nonzero, so we get

**Condition #2:** $\pi_1(M) \to \mathbb{Z}$ is nonzero.

This is equivalent to the condition that the corresponding cohomology class in $H^1(M)$ is nonzero. If we furthermore assume that $F$ is connected, then $\pi_1(M) \to \mathbb{Z}$ must be surjective, which is equivalent to the condition that the corresponding cohomology class is indivisible.

Next, if $M$ is a closed smooth manifold, then so is $F$. This gives

**Condition #3:** $\text{ker} \left( \pi_1(M) \to \mathbb{Z} \right)$ is finitely presented.

Of course this kernel must in fact be the fundamental group of a closed manifold of dimension $\dim M$, so if $\dim M \le 4$ (so that $\dim F \le 3$) then that puts some extra restrictions on it. Beyond this I don't know if there's anything easy to say.