We were trying to prove that if $3p^2=q^2$ for nonnegative integers $p$ and $q$, then $3$ divides both $p$ and $q$. I finished writing the solution (using Euclid's lemma) when a student asked me
"How can you assume $3p^2=q^2$ when that implies $\sqrt 3$ is rational which we know is false?"
I told him that question at hand is used as a lemma in proving that $\sqrt 3$ is irrational. But he gave another argument using fundamental theorem of arithmetic to independently prove that $\sqrt 3$ is irrational. So I could not convince him that one can give a chain of arguments starting from a hypothesis without actually knowing the truth value of the hypothesis itself. Later I came back and tried to think more about this a bit fundamentally to understand what it means to prove the implication $"A \to B"$ without worrying about truth of $A$ and how different is it from proving $B$ when we know $A$ to be true (or false, as in this case, using some other method). But I am also confused. Another student made this remark, "you are giving me one false statement, and asking me to prove another false statement, I don't understand". Can someone please resolve this?
Step 0. Use truth tables to convince him that $A \rightarrow \bot$ is equivalent to $\neg A$. Deduce that to prove $\neg P$, we can assume $P$ and attempt to derive $\bot$, since this allows us to infer $P \rightarrow \bot$, which is the same as $\neg P$.
Step 1. Use truth tables to convince him that $A \rightarrow B$ is equivalent to $\neg(A \wedge \neg B).$ Conclude that to prove $A \rightarrow B$, we may assume $A \wedge \neg B$ and attempt to deduce $\bot$.
Edit. My original answer (above) focuses on the logic of proof by contradiction, but there is also a pedagogical issue here that deserves to be addressed. The following material is taken from the user Keen and from Steve Jessop's excellent answer.