The notion of Hochschild homology can be defined abstractly in any suitable homotopical context in which a tensor product exist (say, in any presentably symmetric monoidal $\infty$-category). Given an associative algebra object $A$ in such a context, its Hochschild homology is the (suitably defined) tensor product of $A$ with itself over $A^{\rm op} \otimes A$. For example, dg-Hochschild homology is the one obtained by working in the $\infty$-category of chain-complexes (and their tensor product), while topological Hochschild homology is the one associated to spectra (and their smash product). Sometimes one comes across objects which might a-priori be interpreted as belonging to two different $\infty$-categories. For example, if we have an ordinary ring, then we may think of it as an object in either chain-complexes or spectra (via the associated Eilenberg-MacLane spectrum), and consequently define both its Hochschild homology and its topological Hochschild homology, which may be different.

When $A$ is a $\mathbb{Q}$-algebra its associated Eilenberg-MacLane spectrum is rational (i.e., the map $HA \to H\mathbb{Q} \wedge HA$ is an equivalence). The $\infty$-category of rational spectra is equivalent to the $\infty$-category of chain-complexes over $\mathbb{Q}$. Moreover, this equivalence is symmetric monoidal and identifies the smash product on the spectra side with the tensor product on the chain-complex side. As a result, the topological Hochschild homology of such an Eilenberg-MacLane spectrum (defined using smash product of spectra) will coincide with its Hochschild homology when considered as a dg-algebra over $\mathbb{Q}$. You can also decide that you add an action of some $\mathbb{Q}$-algebra $k$ on both sides, but this will not matter much: as soon as the two interpretations yield $\infty$-categories which are symmetrically monoidal equivalent, they will produce the same Hochschild homology, essentially by definition.