I think these two concepts are separate. However, please feel free to let me know if you have any questions.
The first concept is assessing if a number is divisible by 4 or by 8.
A number is divisible by 4 if its last two digits (the tens and the ones digit) are divisible by 4. For example, 232 is divisible by 4 because 32 (the last two digits of 232) is divisible by 4.
A number is divisible by 8 if its last three digits (the hundreds, tens, and ones digit) are divisible by 8. For example, 12,160 is divisible by 8 because 160 (the last three digits of 12,160) is divisible by 8.
The above concepts allow you to tell if a number can be divided by 4 or 8 with no remainder left.
Your example is asking how to calculate the remainder when we have a question like “What is the remainder when 3^32 is divided by 4?” 3^32 is an extremely large number and it is hard to calculate it exactly. For questions like these, you need to see a pattern.
Take the question to find the remainder of 3^32 divided by 4. What if we were to solve some easier versions of this question to see if a pattern emerges that allows us to find the remainder? Let’s start with finding the remainder when 3^1 is divided by 4, 3^2 is divided by 4, etc…
3^1 divided by 4 → 3 divided by 4 → Quotient is 0, Remainder is 3
3^2 divided by 4 → 9 divided by 4 → Quotient is 2, Remainder is 1
3^3 divided by 4 → 27 divided by 4 → Quotient 6, Remainder is 3
3^4 divided by 4 → 81 divided by 4 → Quotient 20, Remainder is 1
We see that the remainder alternates between 3 and 1. The remainder is 3 when the power is odd (1 or 3) and 1 when the power is even (2 or 4). Thus, 3^32 divided by 4 has a remainder of 1 because 32 is an even power.
Similar reasoning can help you find the remainder when 3^32 is divided by 8 (3^1 divided by 8, 3^2 divided by 8,…)
I hope that helps!