I know that a half-adder is a combination of the gates: XOR, AND. But how are they combined? And can you give a example and explain which one is the XOR and which one is the AND.
Google is everyone's friend: -
S = sum of A and B, C = carry (A and B both 1).
For a half adder with inputs A and B
SUM = A XOR B CARRY = A AND B
(from All About Circuits)