You understand, I presume, that if the problem were an ordinary differential equation, \frac{d^2}{dx^2}= 0, you would solve it by integrating twice: since the second derivative is 0, the first derivative must be a constant: \frac{du}{dx}= C. And now, integrating again, u(x)= Cx+ D where D is the constant of integration.
It's the same basic idea with partial derivatives except that the constant of integration may be a function of the other variables.
\frac{\partial^{2}u}{\partial x^{2}} = 0 can be read as
\frac{\partial }{\partial x}\left(\frac{\partial u}{\partial x}\right)= 0
That is, that \partial u/\partial x does not depend upon x. It does NOT, itself, say what variables the partial derivative does depend on. If we are given that the only variable are x and y, then \partial u/\partial x must be a function of y only- and it could be any function of y: \partial u/\partial u= f(y).
The point is that taking the partial derivative with respect to one variable, we treat the other variables as constants. So going the other way, taking the anti-derivative with respect to that variable, the ''constant of integration" may actually depend upon those other variables. If g(y) is a function of y only, \frac{\partial g}{\partial x}= 0.
Once we have
\frac{\partial u}{\partial x}= f(y)
integrating again (with respect to x, holding y constant) gives u(x, y)= f(y)x+ g(y) where again, the "constant of integration" can be an arbitrary function of y.
If the independent variables were x, y, and z, the general solution to \frac{\partial^2 u}{\partial x^2}= 0 would be u(x, y, z)= f(y,z)x+ g(y, z) where, now, f and g can be any functions of y and z. You should be able to see by differentiating that these do satisfy the equation.
If you had \frac{\partial^2 u}{\partial x\partial y}= 0, again assuming that the only variables are x and y, integrating first, with respect to y would give \partial u/\partial y= f(y) where f(y), the "constant of integration" can be any function of y. Integrating again, this time with respect to y, would give u= F(y)+ G(x) where F(y) is an anti-derivative of f(y) (since f(y) was arbitrary so is F(y)) and G(x) is the "constant of integration", an arbitrary function of x.