# Explanation of the Groebner Basis of a pair of polynomials?

I was working a problem in which I needed to reduce two polynomials in variables c,p,t into a single polynomial in c,t. Note that t appears only once, at the end of the $q_2$ definition.

$$q_1\equiv 1 + 2 c^2 + 3 c^3 + 3 c^4 + 3 c^5 + c^6 + (2 c + c^2 + 2 c^3 + c^4) p + (c + 5 c^2 + 6 c^3 + 12 c^4 + 6 c^5) p^2 + (1 + 4 c^2 + 4 c^3) p^3 + (4 c + 3 c^2 + 18 c^3 + 15 c^4) p^4 + (2 c + 6 c^2) p^5 + (1 + 12 c^2 + 20 c^3) p^6 + 4 c p^7 + (3 c + 15 c^2) p^8 + p^9 + 6 c p^{10} + p^{12}$$

$$q_2\equiv 16 + 32 c^2 + 48 c^3 + 48 c^4 + 48 c^5 + 16 c^6 + (16 c + 16 c^2 + 16 c^3) p + (16 c + 48 c^2 + 80 c^3 + 160 c^4 + 80 c^5) p^2 + 32 c^2 p^3 + (16 c + 32 c^2 + 192 c^3 + 160 c^4) p^4 + 16 c p^5 + (96 c^2 + 160 c^3) p^6 + (16 c + 80 c^2) p^8 + 16 c p^{10} - t$$

A user on the Mathematica SE gave the following magical line of code that returns exactly what I needed:

GroebnerBasis[{q1, q2}, {p, c}][[1]]


returns:

$$4096 + 8192 c^2 + 12288 c^3 + 12288 c^4 + 12288 c^5 + 4096 c^6 - 768 t - 256 c^2 t + 256 c^3 t + 256 c^4 t + 48 t^2 - 16 c^2 t^2 - t^3$$

Perfect! And I've verified that it's correct. But I have no idea how this result was calculated, and the online explanations I read about the Groebner Basis were a bit over my head because I've never studied Ring Theory.

Can anyone explain to me how this result might have been calculated? I don't need the specifics of how Mathematica does it, just what it is an how one can calculate it. How does one eliminate p from a pair of polynomials like this? What is the Groebner Basis as the concept relates to a pair of polynomials? Can this be explained without Ring Theory?