first of all has to be non-negative.
Then, integrating must make sense: i.e., depending on the level of study, has to be, say, piecewise continuous (for simple Riemann integration) or Lebesgue measurable. This part is usually skipped because it is readily checked.
And finally, the integral of on its domain must equal 1. Note that it is not mandatory to first prove that the integral is finite. Indeed is non-negative, so that the integral always has a value, either finite or infinite, and the computation will show that it is 1.
Good luck with your probability/stats course, it's worth it!