What are the conditions about the equality between a function and his Fourier series?
In case of pointewise convergence of the series, I know that the series converges pointewise at the value $$\frac{f(x_+) + f(x_-)}{2}$$
But in the points of discontinuity, the function may not assume exactly that medium value, for example a function that is equal to $x^2$ in $(0,2\pi)$ and 0 in $x=2\pi$, in this case, in the discontinuity points, the series converges at a function that is not equal to the initial function. Maybe can I say the same that the series is equal to the initial function? Or not? There are some conditions to know when the function is exactly equal to the series?
NO, you don't know that the series converges pointwise to $(f(x_+)+f(x_-))/2$, without some hypotheses on $f$.
When does the Fourier series of $f$ converge to $f$? Yes, there are conditions that guarantee this (note that continuity is not enough). There are many theorems regarding this, which you can find in any introductory text on Fourier series. Or in this modern ago online. I'm about to google "Fourier series convergence" - I predict that I will find many such results very easily.
Sure enough, I found this in less time than it took you to type your question.