How can we use modular arithmetic to find the unit digit of a number or the remainder obtained on dividing a number by another number? I am new to number theory and I heard that we can use modular arithmetic to conveniently find the remainder obtained on dividing a number by another number such as the remainder obtained on dividing (x^y) by a without actual division. Is it possible?How can we do this?
 A: Modular arithmetic allows you to mess with remainders of stuff with very nice properties. In it, instead of considering necessarily some number n, you consider its remainder modulo whatever.
Another way to express this is $n \equiv 0 \ (\textrm{mod} \ n)$
So, for example (I will leave the mod n implied here) $n + 1 \equiv 1$. Can you see why? Congruences behave very nicely with addition and multiplication, so we can do things like $(n+2)(n+3) \equiv (2)(3) \equiv 6$
How does this tie in with powers? Well, suppose you want to know the unit digit of $12^{12}$. The unit digit is the remainder mod 10, so mod 10 it is.
$12^{12} \equiv 2^{12} \equiv (2^4)^3 \equiv 16^3 \equiv 6^3 \equiv 36 \times 6 \equiv 6 \times 6 \equiv 36 \equiv 6$
Presto. We got the unit digit without actually carrying on the full calculation. This is the nice thing about modular arithmetic. There are some other tricks I could have used to make this easier, like euler's theorem... But I'll let you find out for yourself.
