So far I've talked about one-sample methods, and two-sample methods.
One-sample methods are things like the one sample z-test, one sample z-test for proportions, and one sample t-test. In these tests, one sample is being compared to the population.
Now in two-sample methods, samples are being compared to other samples.
Samples are independent if members of one sample are unrelated to members of the other sample. Sample A and Sample B are independent because the members of each are unrelated. Choosing someone for Sample A in no way affects who goes in Sample B, and vice-versa.
Sample A(Husbands) and Sample B(Wives) are dependent because the members of each are related. If a husband goes into Sample A, a specific wife must go into Sample B.
Sample A(Before) and Sample B(After) are also dependent because the members of each are related. If an individual is placed into Sample A(before), the same individual must be in Sample B(after).