Detailed answer
Article represents a self-contained composition such as a forum post or news item.
Section groups a theme within a larger document, normally with a heading. Use div when the grouping is only for layout and has no particular document meaning. The choice is about content purpose rather than default appearance.
Example
<article><h2>HTML forms</h2><section><h3>Labels</h3><p>Name every control.</p></section></article>
Understanding the behavior
An article should make sense as a relatively independent item, such as a post or a review. A section groups related content within a larger structure and usually needs a meaningful heading. Neither is a general replacement for every div.
Practical implementation notes
Ask whether the block could reasonably stand on its own. If the wrapper exists only to create a grid or apply spacing, a div may express the purpose more accurately.
How to check it
Read the article outside its original page, then examine whether the subsection needs that context.
Expected result
Article remains self-contained; section describes a theme within it.
Watch out: Do not replace every layout wrapper with section.
Read the reference ↗