$\frac 57$ is equal to $0.7$. Remaining is $1$.
by definition, the remainder when dividing $\frac mn$ is such a number $r$ such that
$0≤r<n$
There exists some $k$ such that $k\times n+r=m$
In this case: $1\times7+r=5$, so $r = -2$
And now? how do I get the $5$ as result?
$\cfrac 57 \approx 0.713$
But modular arithmetic is integer division, unlike above.
$5 \mod 7\equiv 5$
$7$ goes into $5$ zero times
$k+(0*7)=5 \implies k=5$, and the remainder is $5$ after $7$ goes into $5$ zero times