@Lucero Sanchez cash on cash is determined by how much cash comes initially out of YOUR pocket vs net monthly income.
ex: $50,000 property 20% down = $10,000 our of your pocket
lets say it rents for $1000 and your expenses are $600(PMI, taxes, insurance)
this leaves you with $400 cash flow which is 4% of $10,000 so your monthly cash on cash is 4% yearly cash on cash is 48%
However cash on cash is not the same as the 2% rule. In this case $1000 is 2% of $50,000 so it meets the 2% rule but again the cash on cash is 48%.
not directly related to your question but CAP rate is the yearly percentage of the total capital in a deal that is recovered.
so on our $50,000 house with a $400 cash flow the cap rate is 9.6%
$4800 net income per year is 9.6% of $50,000
In summary cash on cash can give you an idea of what your returns are while taking leverage into account, while CAP rate is better used to look at the viability of a deal with more of a birds eye view, the 2% rule is a general guideline to see if a rental stacks compared to others.