A bar magnet is a rectangular object that has a magnetic field. It is usually made of iron or steel, but it can also be made of any ferromagnetic substance or a ferromagnetic composite. This type of magnet is almost always permanent, meaning that it will retain its magnetic field for a significant period of time without the use of a supplied electric current.

Each end of a bar magnet is called a pole — one is north and the other south. When freely suspended, the magnet will align itself so that the end of its northern pole points towards the Earth’s magnetic North Pole. This works in the exact same manner as a compass needle, which itself uses or is a magnet. If the magnet has one end painted red, that end is traditionally the north pole.

Bar magnets are usually made of ferromagnetic materials, which are elements that can naturally have a magnetic field. They include cobalt, iron, and nickel. Some magnets are made of composite materials that combine ferromagnetic materials with other substances such as aluminum, clay, or resin.

 definition provided by Wise Geek

Two or more bar magnets 

    When two bar magnets interact with each other the rules for permanent magnets still apply. 

  1. Magnetic field lines come out of the north pole and head to the nearest south pole. 
  2. Field line never cross. 
    So in the first example two magnets with the north end of one facing the south end of the other.  The field lines head from the north end to the south, but what about the outside poles? The field want to head to the nearest opposite pole but can't violate the second rule, so the nearest pole the outside pole on the other side.  The next two examples like poles are facing each other (north facing north, or south facing south).  The two rules are still in affect, the field lines head out of the north end to the nearest south pole, in both cases the the nearest south pole is its own.