What is the necessary and sufficient condition for the existence of a primitive of a function
Solution 1:
I assume that by the primitive of $f$, you mean the antiderivative of $f$: http://en.wikipedia.org/wiki/Primitive_function.
To answer your question:
Yes, if $f$ is continuous on $[a, b]$, then the indefinite integral $F$ defined by $F(z) = \int_a^z f(x)dx$ is a primitive (or antiderivative) of $f$.
If $f$ is not continuous, $f$ may still have a primitive, but there's no general rule as to how to find it. See this page on wikipedia for more info on primitives of non-continuous functions.
Hope this helped!