Any current-carrying wire is surrounded by a magnetic field of concentric circles, and the right-hand thumb rule tells you which way it curls.
Point your right thumb along the current: your curled fingers show the field's direction, wrapped around the wire in circles.
In 1820, Hans Christian Oersted noticed something remarkable by accident: a compass needle deflected whenever it was placed near a wire carrying current. That single observation showed electricity and magnetism are linked: a current-carrying conductor always has a magnetic field around it.
For a long straight wire, sprinkling iron filings on a card around it (with the wire passing through) reveals the field's shape: concentric circles centred on the wire. The field gets weaker the farther the circle is from the wire, and stronger when the current is increased.
The direction of these circles is given by the right-hand thumb rule: imagine gripping the wire with your right hand so your thumb points in the direction of the current; your curled fingers then show the direction the field lines circle around the wire.
Reverse the current, and the field's direction reverses too: the compass needle swings the opposite way. This rule is also called Maxwell's corkscrew rule: turning an imaginary corkscrew in the current's direction turns it the way the field circles.
Key exam points
Watch it explained
Magnetic field due to a straight current carrying conductor | Right hand thumb rule Class X Science · GYAANI KEEDA