Hey vp1489.

Basically a good way to think of it is that you have two distributions: one for each hypothesis.

The Type I error is the probability region for the null hypothesis distribution that corresponds to your alpha significance value. Similarly the Type II error is the same thing, but its for the distribution for your alternative hypothesis.

Each test statistic has a distribution and each hypothesis has a corresponding distribution for that particular test statistic.

The distributions may be completely complementary (H0: mu = 0, H1: mu != 0) but they may not be (H0: mu = 0, H1: mu > 1). It depends on your specific hypothesis.

That's it in a nutshell: get the hypothesis, find the test statistic, get its distribution and find the rejection region for each hypothesis distribution and that's your Type I and II errors.