I don't understand section b, $f$ is a quadratic form over the rationals, and there is an injection between $\mathbb{Q}$ and the $p-$adic field $\mathbb{Q}_v$. I haven't understand here what the quadratic form $f_v$ is, and why its discriminant is the image of $d(f)$ under the given function in the photo.

If $q$ is given by $q(x)=a_1x_1^2 +\cdots a_nx_n^2$ for $x\in \mathbb{Q}^n$, then $q_v$ is given by $q_v(x)=a_1x_1^2 +\cdots a_nx_n^2$ for $x\in \mathbb{Q}_v^n$.
$d_v(q)$ is, by definition, $a_1\cdots a_n=d(q)$ but viewed as an element of $\mathbb{Q}_v^*/(\mathbb{Q}_v^*)^2$, so indeed it's the image of $d(q)$ under $\mathbb{Q}^*/(\mathbb{Q}^*)^2\to \mathbb{Q}_v^*/(\mathbb{Q}_v^*)^2$ (this is NOT an injection though).