First thing to remember is that there's no way you can (nor should you ever want to, probably) produce the foamy cack that supermarkets sell as "sliced bread". Bread massproducers use all kinds of weird flour and steam ovens that just aren't available to the home baker; and besides, if you like that stuff, it's cheaper to go out and buy it.
Bread - at least yeast-raised bread - should taste yeasty. But if it's too yeasty, you may be using too much sugar or too much yeast, or letting the yeast grow in rather too warm a temperature. If you're using dried yeast - and I think you have to be a bit of a purist not to - you need to follow the instructions pretty carefully. If they say "warm" water, that's body temperature or only a shade warmer. If they say "two teaspoons per pint", then two it is. If you do your yeast in a Pyrex jug, as I do, you don't need more than a half-inch of "head" on it to get a good raise.
At least your bread tasting yeasty rules out one reason for dense bread: that you've added insufficient yeast. It is just possible that you've done something loopy like trying to awaken your yeast in water that's far too hot, which has killed it and left just the flavour behind, but that's fairly unlikely.
Dense bread happens for two - no, three - main reasons:
1) Too cool an oven, or insufficient oven time. You need heat to expand the carbon dioxide from the yeast and blow bubbles in the gluten. Trying to raise dough in a freezing kitchen also doesn't work well. Turn on the oven before you start to bake.
2) Failed gluten. This happens, for example, if you use cake flour instead of "strong" or "breadmaking" flour. Soft flours don't develop a strong gluten, and the bubbles collapse. Gluten can also fail if you under- or over-knead the bread. Underkneading produces a weak gluten; conversely, overkneading will make the gluten brittle, and your bubbles will collapse.
3) Salt. Salt kills yeast. A little is good for them, but a lot shuts them down. Don't be overgenerous with the salt. Also do rinse utensils before using them. Dishwasher detergent or washing-up liquid will rupture the yeast's cell walls, and it doesn't take much.
Cause 1 is easy to spot. The bread will come out pale and wet; it's obviously undercooked, perhaps even utterly unbaked in the centre. Perhaps you oven thermostat needs looking at?
Cause 2 is usually easy to fix. Always - unless you have a recipe which specifically instructs you otherwise - use a flour labelled "strong" or "bread" flour. Follow the recipe carefully. If it says "mix, then rest, then knead, then rest, then divide, then allow to rise again" - why, do that! Until you're sure you can use a recipe reliably, follow it faithfully.
Cause 3 again is solved by following the recipe and by not killing your yeast.