I will try for a more intuitive explanation:
Consider the case where you are asked to compare 2 distances to see which is further, but one of the distances is given to you in miles and the other in kilometers. You cannot compare the 2 numbers directly, but first need to convert at least one of them. But, it does not matter if you convert the kilometers to miles and compare miles to miles, or convert miles to kilometers and compare kilometers to kilometers, or even convert both to leagues and compare leagues to leagues. As long as all the conversions are correct we will come to the same conclusion as to which distance is further.
The same is true with hypothesis testing, on one end we have the data, on the other end we have our type I error rate ($\alpha$), and between we have hypotheses and assumptions.
Simplifying a bit there are 2 directions of conversion:
data -> test statistic -> P-value
???? <- critical value <- alpha ($\alpha$)
We can compare a p-value to alpha to declare significance, or we can compare the test statistic to the critical value. Sometimes we can even compare a statistic that is not the usual test statistic to a different critical value (the ???? above). The hypothesis and assumptions determine which test statistic we compute and how we convert either from test statistic to p-value or from alpha to critical value.
For a more concrete example lets say that we want to test if a coin is fair by flipping it 10 times. The null hypothesis is that the probability of heads is 0.5 and the alternative is that it is not 0.5 in either direction. We can do the test using the binomial distribution, or the normal approximation to the binomial (probably not a good idea with n=10, possibly reasonable if we flipped the coin 20 times, would be fine if we flip it 100 times) or a couple of other methods (this is why you sometimes see computations using the t distribution or the f distribution or the ? distribution).
In this example there are only 11 possible outcomes (number of heads out of 10 flips), so if we use an alpha of 0.05 then the true probability of a type I error is about 0.021 (probability of flipping 0, 1, 9, or 10 heads). If we now do the experiment and get 7 heads then we would calculate the p-value as the probability of getting 7, 8, 9, or 10 heads plus the probability of getting 3, 2, 1, or 0 heads since those are as extreme in the opposite direction. This p-value is 0.344 and we would compare that to our alpha of 0.05 and not reject the null hypothesis.
Or we could have looked at the probabilities of the different outcomes when the null is true and created a critical region. We do this by starting at the extremes and working in as far as we can without exceeding alpha. In this case the critical region says we will reject if we see 0, 1, 9, or 10 heads and not reject if we see other values. Then we flip the coin and see 7 heads (same as above) and from that we don't reject, same conclusion.
Either way will give us the same results, we will see a p-value < 0.05 if we flip 0, 1, 9, or 10 heads and a p-value > 0.05 otherwise. Personally the critical value approach is more intuitive to me, but computers have made the p-value approach more common (and there are advantages there as well).
Why do we start from the extremes when calculating the critical region, or why do we include all the more extreme values in calculating the p-value? Well consider this case, with 10 flips of a fair coin there is a 0.0439 probability of flipping exactly 8 heads, so we could define our critical region as flipping 8 heads. But if we expand the region to 8 or 9 heads then the probability is greater than 0.05 (0.0537 to be more precise), so that does not work. We could set the rejection region to be 0, 8, or 10 heads and that keeps us below 0.05 (0.0459). But does that really make sense as a critical region? before flipping the coin we are already saying that if we see 0, 8, or 10 heads we will reject the null, but if we see 9 heads (or 1 head) we will not reject the null, this works mathematically but not intuitively that if 8 is extreme enough then 9 should be even more evidence, not less.