When $3$ fair coins are flipped, the total sample space is
$S=\{HHH,\ HHT,\ HTH,\ THH,\ HTT,\ THT,\ TTH,\ TTT\}.$
We are given that $\textit{at least one coin shows a head and at least one coin shows a tail}.$
So the outcomes $HHH$ and $TTT$ are not possible.
Hence, the reduced sample space is
$S'=\{HHT,\ HTH,\ THH,\ HTT,\ THT,\ TTH\}.$
Thus, the number of possible outcomes is
$n(S')=6.$
Now we need the probability that $\textit{exactly two of the coins show heads}.$
The outcomes with exactly two heads are
$\{HHT,\ HTH,\ THH\}.$
So the number of favorable outcomes is $3.$
$\therefore P(\text{exactly two heads} \mid \text{at least one head and at least one tail})=\frac{3}{6}=\frac{1}{2}.$
Answer: $\boxed{\dfrac{1}{2}}$