For example we have:
$$ \begin{aligned} \mathbb{Z}_7^* &= \left\{[z]_7 \in \mathbb{Z}_7 : \gcd(z, 7) = 1, 1 \leq z < 7, \forall z \in \mathbb{Z}\right\} \\ &= \{1, 2, 3, 4, 5, 6\} \\ \left<a\right> &\in \mathbb{Z}_7^* : \{a^b \mod 7: \forall a,b \in \mathbb{Z}_7^*\} \end{aligned} $$
This would produce:
$$ \begin{aligned} \left<1\right> &= \{1\} \\ \left<2\right> &= \{1,2,4\} \\ \left<3\right> &= \{1,2,3,4,5,6\} \\ \left<4\right> &= \{1,2,4\} \\ \left<5\right> &= \{1,2,3,4,5,6\} \\ \left<1\right> &= \{1,6\} \end{aligned} $$
As such, the smallest primitive root $g = 3$ as $\left<3\right> = |\mathbb{Z}_7^*|$.
So, $g$ is our generator, that can construct $\mathbb{Z}_7^*$ and the element of $a \in \mathbb{Z}_7^*$ can be expressed as:
$$ 3^z \equiv a \pmod7 \to z = \text{ind}_{7,3}(a) $$
Now, my issue, how do I solve for $z$ given $a$:
Lets say $a = 4$ we want to solve:
$$ 3^z \equiv 4 \pmod7 \to 3^z \mod 7 = 4 \mod7 = 4 $$
I think I understand this correctly, I just do not know how to solve for $z$.
Now this relates to a question I need to answer, just with different numbers. Both of which are $\mathbb{Z}_p^*$ where $p$ is a prime number, not sure if that is significant or not.
Draw the table order of $\mathbb{Z}_7^*$ choose the smallest $g$ and compute a table giving $\text{ind}_{7, g}(a) \forall a \in \mathbb{Z}_7^*$.
Now I believe I did the first part correct, the $\left<a\right>$ is the order table and $g = 3$.