The method: split the cases
Two brothers have a peculiar family rule: one always tells the truth and the other always lies, in everything they say. You do not know which is which. The solving method for every riddle of this kind is called case-splitting: assume one brother is the truth-teller, follow the consequences, and check for contradictions. A case that contradicts itself is impossible; the surviving case is the answer.
Warm up with a single statement. One brother announces: 'We are both liars.' Suppose he were the truth-teller - then his claim would be true, making him a liar, which contradicts the supposition. So he is the liar. But then his claim is false, so they are not both liars - meaning his brother tells the truth. One statement, fully solved.
A two-statement workout
Now both brothers speak. The first says: 'My brother is the liar.' The second says: 'We are the same type.' Test the case where the first brother tells the truth: then the second really is the liar, so his statement 'we are the same type' is false - and indeed they are different types. Everything is consistent, so this case survives.
Test the other case: suppose the first brother lies. Then his claim is false, so the second brother is the truth-teller - whose statement 'we are the same type' would have to be true. But a liar and a truth-teller are not the same type. Contradiction, so this case dies. The answer is forced: the first brother tells the truth and the second lies.
Try it yourself
Invent your own pair of statements. Give each brother one line, then run both cases honestly. Beginners often accidentally build riddles where both cases survive - the statements are then too weak, and the fix is to make one statement talk about the statements themselves, like the examples above.
A reliable recipe: make one brother claim something about the pair ('we are both...', 'we are different...') and the other claim something about the first brother. Self-reference is what gives these riddles their grip - it is the same ingredient that powers the knights and knaves island.

