Proof $p \vdash q \Rightarrow p$ Firstly, how do I read it? Is below right? With braces 
$$p \vdash (q \Rightarrow p)$$
The given proof is: 


*

*${p}$, premise

*${q}$, assumption

*

*$p$ by (1) // what???


*${q} \Rightarrow p$ by implication introduction with 2 and 2.1
QED... 


I can't really get the link between $p$ and $q$ in 2.1 ... 
 A: The point of the claim is that there is no link between $p$ and $q$ in 2.1. Once $p$ is a premise, anything implies $p$, because an implication can only be false if its consequent is false.
A: There doesn't have to be any intuitive connection. If you can somehow derive $p$ after (not necessarily because) you assume $q$, then you're allowed to conclude $q\Rightarrow p$.
In this case, $p\vdash\cdots$ means that you're explicitly allowing yourself to prove $p$ from nothing. Then you can also prove $q\Rightarrow p$.
A: Many/most systems of natural deduction for classical (non-relevantist) logic allow (i) reiteration, and also (ii) unrestricted discharge of assumptions -- so we are allowed to write


*

*$p\quad\quad\quad$   Premiss

*$\quad|\quad q\quad$ Supposition

*$\quad|\quad p\quad$ From (1), by reiteration

*$q \to p\quad\ $  Conditional Proof, by proof from (2) to (3)


There is indeed no 'link' between $p$ and $q$ at step (3). But that isn't needed at step (4), in most systems. The CP rule is: given a sub-proof starting from $A$ and concluding $B$ we can discharge the assumption $A$ and infer $A \to B$ (on the remaining assumptions/premisses). We don't, in typical classical systems, have to check that the assumption $A$ is actually invoked in getting to $B$. 
Does that mean we shouldn't like reiteration and/or should restrict discharge? Well, actually that wouldn't much affect things in the presence of other standard rules. Thus consider the proof


*

*$p\quad\quad\quad\quad$   Premiss

*$\quad|\quad q\quad\quad$ Supposition

*$\quad|\quad p \land q\quad$ From (1), (2)

*$\quad|\quad p\quad\quad$ From (3) 

*$q \to p\quad\quad\ $  Conditional Proof, by proof from (2) to (4)


And now $q$ is invoked en route to getting to line (4).
