The image below shows the magnetic lines of flux around a bar magnet.
The image below shows the effect of two bar magnets with the same pole facing each other.
The image below shows the effect of two bar magnets with disimilar poles facing each other.