As an example, consider the field of order 9. This is an extension of the integers mod 3. Since 2 has no square root mod 3, x2+1 is an irreducible polynomial. Thus the field of order 9 consists of expressions ax+b, where a and b are integers mod 3. How can we do arithmetic in this field? Perform polynomial addition and multiplication as usual, but replace x2 with 1 whenever it appears.
Of course, finding q(x) could be tricky when p and n are large. This is addressed elsewhere.