We usually take this for granted, but it follows from the definition of the indefinite integral. The indefinite integral is such that its derivative is the function between the curvy integral symbol and the dx. In this case the function is the constant a.
So, to prove this integral we simply have to derive the function we have to the right of the equal sign. We obviously get the function a. To prove that any indefinite integral, we simply have to derive the right side of the equation. If we get the function inside the integral, it means we got it right.