Which theorem could be used? I want to write the $p-$adic expansion of $6!$ in $\mathbb{Q}_3$.
I have to solve the congruence $x \equiv 6! \pmod {3^n}$, right?
I found the following:
$$x_0 \equiv 6! \pmod 3 \Rightarrow x_0 \equiv 0 \pmod 3$$
$$x_1 \equiv 6! \pmod {3^2} \Rightarrow x_1 \equiv 0 \pmod {3^2}$$
$$x_2 \equiv 6! \pmod {3^3} \Rightarrow x_2 \equiv 18 \pmod {3^3}$$
$$x_3 \equiv 6! \pmod {3^4} \Rightarrow x_3 \equiv 72 \pmod {3^4}$$
Using the formula $x_n=\sum_{i=0}^n a_i 3^i$, I found: $a_0=0,a_1=0,a_2=2,a_3=2$.
Is there a theorem I could use, in order to find the coefficients of the infinite series?
A theorem that states, for example, that the solutions we find are periodic?
 A: From the comments, it seems you understand now that $720$, just like any other integer, has a finite $3$-adic representation, i.e. one of the form $$720=a_0 3^0+a_1 3^1+\cdots +a_n 3^n,$$ and you want to find the digits $a_0,\cdots, a_n$, where $0\leq a_i\leq 2$.
We will do it step by step.  How do we find $a_0$?  If we reduce the expression above modulo $3$, we get $720 \equiv a_0\pmod{3}$.  Do you understand this step?  All positive powers of $3$ go away because we took the remainder modulo $3$.  
Now, $720 \equiv 0 \pmod{3}$ so $a_0\equiv 0\pmod{3}$.  But there is only one integer $a_0$ between $0$ and $2$ that is zero modulo $3$: the integer $a_0=0$.  Thus we found the zeroth digit!
On to the first digit.  We reduce the equation $720=a_0 3^0+a_1 3^1+\cdots +a_n 3^n$ modulo $3^2$.  What do we get?  All powers of $3$ above the first go away and we get $a_0+3a_1 \equiv 0 \pmod{3^2}$ (because $720$ is zero mod $9$).  Hmmm, we did not quite get $a_1$, but no worry.  We now know $a_0$ from the previous step, so how do we find $a_1$?  
Since $a_0+3a_1$ is smaller than $9$ and zero mod nine, it has to equal zero in the integers.  This is a crucial property: if a quantity $q$ reduced modulo $M$ is equivalent to $a$ with $0\leq a < M$ and we know that $0 \leq q <M$, then actually $q=a$ as equality of integers. So in our case we get $a_0+3a_1=0$.
Now subtract $a_0$ (a digit we already know) from the equation $a_0+3a_1=0$ and divide by three to get $a_1$.  There, we found the first digit which (expectedly) equals zero.
On to the second digit: we reduce the equation $720=a_0 3^0+a_1 3^1+\cdots +a_n 3^n$ modulo $3^3$ to get $$a_0+3a_1 + 9a_2 \equiv 18 \pmod{3^3}.$$  Again, since $a_0+3a_1+9a_2< 27$ we conclude that $$a_0+3a_1 + 9a_2 = 18. $$ But from our previous divsion we had obtained $$a_0+3a_1=0.$$  Subtracting the equations and dividing by $9$, we find $a_2 = 2$.  This gives us the second digit.
In general, this is the procedure: reduce your number modulo powers of $3$ consecutively.  The first power will immediately give you the zeroth digit.  To get the $k$-th digit, reduce $720$ modulo $3^{k+1}$ and modulo $3^k$; consider these remainders as integers, subtract them and divide by $3^k$.  The integer you will get is your $k$-th digit.
So for instance you already computed $720 \equiv 234 \pmod{3^5}$ and $720 \equiv 72 \pmod{3^5}$.  Subtract $234-72 = 162$ and divide that by $3^4$ to get $a_4=2$.
When do we stop?  Your partial expressions $a_0+\cdots +a_k 3^k$ will be smaller than 720 but steadily increasing as you add more and more digits $a_k$, and eventually will become equal to 720.  This is where you will stop. (If you continue, the previous process will keep giving you zero digits forever).
I hope this helped, but if you still have unclear points I think you should make a serious review of congruences and their laws before tackling $p$-adic numbers.
A: Every $p$-adic number has a well-defined $p$-adic expansion. When we take an element of $\mathbb{Z}$ and represent it in $\mathbb{Q}_p$, we have very little to do. 
You are asking about $6! = 720$ in $\mathbb{Q}_3$. The coefficient of $3^n$ will be $720 \pmod {3^n}$. For $n \geq 6$, we see that $3^n > 720$. So the coefficients for all $3^n$ with $n \geq 6$ will be $720$. It is characteristic of the (normal) integers that they have finite (in this sense) expansions. 
You are just left with finding the coefficients for the other $n \leq 5$. Quickly, we see that 
$$\begin{align}
720 &\equiv 0 &\pmod 3\\
 &\equiv 0 &\pmod {3^2}\\ 
&\equiv 18 &\pmod {3^3}\\
&\equiv 72 &\pmod {3^4}\\
& \equiv 234 &\pmod{3^5}\end{align}$$
and this gives us the entire expansion. 
