To specifically answer your questions:
“Clearfixing” techniques are not related to HTML5; For that matter, they are not related to HTML at all. Clearfixing techniques are related only to CSS.
Some people/tutorials call clearingfixing techniques, “hacks”. Like this article: http://learnlayout.com/clearfix.html.
Truth is, they are not hacks. Pretty much, a CSS hack does not validate or is against a standard or uses proprietary technology. The clearfixes I’ve used in my career are all valid CSS techniques. That’s what they are, techniques.
Yes, that’s what you use clearfixing techniques for.
Again, clearfix techniques are related to CSS only.
The reason you/we use a clearfix technique is because when an element is floated it’s taken out of the document flow… it’s “floating”. What happens is that the parent container won’t be taking that element into account to allow it to define its height. We know that the content (text, images, videos, forms, etc.) inside a container is what dictates the height of that container, unless this height is specifically defined.
This means that because the floated element isn’t affecting the height of its parent container, its parent container will “shrink” its height, thus we see the floated element sticking out of the container.
Then when we apply a clearfix technique to that parent container, we’re pretty much telling the parent container: “Dude, I need you to consider the floated element(s) inside of you so you can then extend to the necessary height. You cool with that? :)”. And then the parent container, magically really, extends the height IF that floated element(s) wasn’t(weren’t) floated in the first place.
And then to save you all that headache, you use Flexbox
: http://flexboxin5.com/