Here the rank refers to the presumed latent or hidden factors. It can help to measure, how much different people liked movies and tried to cross-predict them. You might have three fields: person, movie, number of stars. All the movie ratings could be perfectly predicted by just 3 hidden factors, sex, age, and income. Here, the "rank" of your run should be 3.
We are mostly unaware of the underlying factors, that drive your data. The more you use, the better the results up to a point, but the more memory and computation time you will need.
Hope this answer helps you!
If you want to learn Spark then go through this Apache Spark tutorial: