Actually I don't quite understand the concept of p-adic numbers and I learned that $\mathbb{z}_{\ge 0}=\{a_0+a_1p+...+a_lp^{l}|l\in\mathbb{z},a_i\in \{0,1,...,p-1\}\} $ and p is prime. If p=7, I am wondering how can 10 be written in terms of polynomial of 7?
In addition to this, I am wondering how can we write all rational numbers in terms of $a_{-l}p^{-1}+a_{-l+1}p^{-l+1}+...$
Some people, and I am one of them, like to represent $p$-adic numbers in standard $p$-ary notation, so that $a_0+a_1p+a_2p^2+a_3p^3+\cdots$ comes out as $\cdots a_3a_2a_1a_0.$ One pleasing aspect of this notation is that you do addition, subtraction, and multiplication exactly as (I hope) you learned in elementary school, but you probably learned only the decimal notation. For the $p$-adics, the expansion goes (potentially) infinitely to the left, as opposed to the real situation, where the expansion can go infinitely to the right.
For your first question, to represent ten as a $7$-adic number, just write ten in $7$-ary notation: $13$. That means $3+1\cdot7$.
For your second question, the answer is a little more difficult. If your rational number has denominator indivisible by $7$, you can modify the long division procedure you learned in elementary school to work it out by hand, though naturally if the numbers are large, the process is tedious. I won’t explain $p$-adic long division here, since the static nature of written discourse is not well suited to demonstrating an algorithm.
Finally if you have a number of form $z/p$, where you know the $p$-adic expansion of $z$, just move the radix point leftward one unit.
Maybe I should give an example: in the $7$-adics, $-1/2=\cdots33333.$ Why? We’re talking about $3+3\cdot7+3\cdot7^2+3\cdot7^3+\cdots$ This is a geometric series, initial term $3$, common ratio $7$, and so the formula you learned in high-school says that the sum is $3/(1-7)$, voilà. But it’s no good unless the common ratio is less than $1$ in size, and fortunately, $7$ is small in the $7$-adic world, its standard $7$-adic absolute value is the real number $7^{-1}$, which is small. So you see that $1/2$ may be calculated as $-1/2+1=\cdots333333+1=\cdots33334$, and the reciprocal of fourteen comes out as $\cdots3333.4$