Claim: if n leaves remainder 1 when divided by 3, then so does n2. Start with what the hypothesis means: n=3k+1 for some integer k. Now there is material to work with: n2=(3k+1)2=9k2+6k+1=3(3k2+2k)+1. The bracket is an integer, so n2 is 3 times an integer plus 1, which is exactly what "remainder 1" means. You started at P, walked forward through algebra and arrived at Q. For n=7: 49=3⋅16+1.
The shape is always the same: assume P for an arbitrary object, rewrite P with its definition, transform, and recognise the definition of Q at the end. "Arbitrary" is what makes it a proof: k could be any integer, so the argument covers every such n at once, which checking n=4,7,10 never could. Write down the target before you start ("I need 3(integer)+1") so you know which form to steer toward.
Two things look similar but are not direct proofs. Starting from Q and working back to P proves the converse, a different statement. Assuming Q is false and hunting for an impossibility is proof by contradiction. In a direct proof Q is never assumed; it is only the destination. If the forward road stalls, as it does for "if n2 is even, then n is even", switch to the contrapositive.
Think of it like this. A direct proof is like cooking from the ingredients you were handed: start with what P gives you, apply one allowed step at a time, and stop when the dish matches the picture of Q. Unlike cooking, you can't taste a few batches and call it done; the steps must work for any ingredients that fit P.
Core idea. A direct proof assumes the hypothesis P is true and chains definitions, algebra, and known theorems forward until it reaches the conclusion Q.