completion of quadratic field to p-adic field. Completion of rational number at primes is clear. But when it comes to quadratic field is little tricky.
Can any one provide a material or illustrate, how does a quadratic field, when completed at a prime ideal becomes a p-adic field.
 A: We don’t need to restrict to quadratic fields. 
Take any finite algebraic extension $k$ of $\Bbb Q$, and its ring of integers $R$. There’s unique factorization of ideals into products of primes here, so if $\mathfrak p$ is a prime ideal of $R$, you can define, for any $z\in R$, the $\mathfrak p$-absolute value $|z|_{\mathfrak p}$ as $p^{-v}$ where $zR=\mathfrak p^vI$, where $I$ is the product of all the other primes appearing in $zR$. (A more sophisticated definition of $|\star|_{\mathfrak p}$ raises not $p$ but a certain power of $p$ to the exponent $-v$, but that’s another story.)
For instance, in $k=\Bbb Q(\sqrt{-6}\,)$, where the ring of integers is $R=\Bbb Z[\sqrt{-6}\,]$, take $\mathfrak p=(2,\sqrt{-6}\,)$. Then since $\bigl(2\sqrt{-6}\bigr)=\mathfrak p^3\cdot(3,\sqrt{-6}\,)$ as ideals, we get $\bigl|2\sqrt{-6}\bigr|_{\mathfrak p}=p^{-3}$. Complete $R$ with respect to this absolute value, and you get a $p$-adic ring, which is actually an extension of $\Bbb Z_2$.
A: To your specific question about the completions of quadratic fields, because the degree is just 2,the general theory easily gives complete and neat answers. Let $=\mathbf Q (\sqrt d)$, where $d$ is a square free integer. The decomposition of a rational prime $p$ in the ring of integers $R$ of $K$ is completetely known in function of $p$ and $d$. I summarize:
1) If $p\mid d$, then $pR$ is the square of a prime ideal $P$ (given explicitly, but we don't need this). This implies that the local extension $K_P=\mathbf Q_p (\sqrt d)$ is totally ramified of degree 2
2) If $d$ is odd, then $2R$ is of the form : $P^2$ if $d\equiv 3$ mod 4, and again  $K_P=\mathbf Q_2 (\sqrt d)$ is totally ramified of degree 2; $P.Q$, where $P$ and $Q$ are distinct conjugates if $d\equiv 1$ mod 8, in which case $K_P=K_Q=\mathbf Q_2$ (split case) ; $P$ if $d\equiv 5$ mod 8, in which case $K_P=\mathbf Q_2(\sqrt d)$ is unramified of degree 2 (inert case)
3) If $p$ is odd , $p\nmid d$, then $pR$ is of the form: $P.Q$ if $d$ is a quadratic residue mod $p$, in which case $K_P=K_Q=\mathbf Q_p$ ; $P$ if $d$ is not a residue, in which case $K_P=\mathbf Q_p(\sqrt d)$ is unramified of degree 2
Actually, since we don't need to know the explicit form of the prime ideal(s) $P$ dividing $pR$, the solution  boils down to the relation : for a fixed $p$, the global degree (=2 here) = $\sum e_P .f_P$, wher $e_P$ is the ramification index, $f_P$ the inertia index, and the sum bears on all the $P\mid d$ .
