The force from a magnet that attracts or repels an object is called magnetism.
Magnetism works over distance so the magnet doesn’t have to be touching the other object.
Magnets have an area around them called a magnetic field. They can do things to other objects in this magnetic field. They can:
Pull other objects towards them (attract)
Push other objects away from them (repel)
The iron filings form a pattern that reveals the lines of the magnetic field. The closer together the lines are, the stronger the magnetic force.
A) south pole
B) north pole
Like poles repel - they push apart. Opposite poles attract - they pull together.
When two bar magnets are brought close together, their magnetic fields interact with one another. If the magnets are similar poles then they repel each other. If opposite poles then they attract each other.
Earth has its own magnetic field which surrounds it like a bubble. It's made up of two big magnets at opposite ends of Earth. These are called the North Pole and South Pole.
Compasses point north because their needle aligns with the Earth's magnetic field. This means that the compass points to the North Pole even though we don't live near the actual North Pole!
Repelling
Two poles of the same type will repel each other.
So:
Two north poles together will repel each other.
Two south poles together will repel each other.
Attracting
The north pole of a magnet will always attract the south pole of another magnet.