Why opposite poles of magnet attract each other, why don't they repel? We know that different poles of magnet attract each other, but I don't know why this happens why similar poles doesn't attract.
what is difference between similar poles and different poles?
 A: Because we've seen it this way in experiment. Suppose we know nothing about magnetic field but that magnets have two poles. Suppose we have three magnets A, B, and C each with two poles so A1, A2, etc. Now we do an experiment. We put A1 in front of B1 and they attract each other then we do this between A1 and C1 and they attract each other too. Now if same poles were to attract each other then A1, B1, and C1 should have been the same and B1 and C1 should also attract each other but then we see they don't.
A: One way to look at this is to look at the stored energy in a magnetic field. Stored energy goes with the square of the field. And the fields of multiple magnets are just the sum of the individual fields.
This means that if you take two magnets and look at their individual field maps, then they will be trying to move to the situation where there is less energy stored in the field. This diagram shows what happens:

While there is a small region where the field has become stronger, there is a much larger region where the field is much weaker; and since stored energy scales with the volume integral of $b^2$, this configuration has lower energy as the two poles get closer (when they are completely together, there is no longer any volume with the high field in it).
When the poles point the same way, this is what you get:


Here, the field lines are pushing away from each other - and now there is a large region just above and below the line where the bar magnets align where the field strength has gone up. And this requires more energy. Moving the magnets further apart, you reduce that energy.
Another way to think about it: each magnet can be thought of as a small loop of wire with a current flowing through it (in the limit, a current loop is a magnetic dipole). Now we know that when two parallel wires each have a current flowing in them, these wires attract. In fact, the formal definition of the ampere is


The ampere is the constant current that will produce an attractive force of 2 × 10^{−7} N per meter of length between two straight, parallel conductors of infinite length and negligible circular cross section placed one meter apart in a vacuum.


The wire doesn't have to be straight for there to be an attraction - so two circular coils will also attract if each has a current flowing in the same direction as the other. And that is of course completely analogous to the situation where you have two magnets pointing in the same direction.
A: The answer is actually very simple, and I know I will be told I am wrong for saying this, but opposites don't attract. North poles are equivalent to a point, while south poles are like a large circle, growing larger as it moves away from the point. It looks like a waffle cone, if you could imagine. North is the bottom of the cone and south is where you would put the ice cream. This is the reason the two opposite poles APPEAR to attract/repel. North fits inside of south in this manner. There is no actual force or energy created, although to our senses it certainly appears that way. 
If opposites attracted, the poles would be in the center of the magnet, not the ends. Like 'attracts' like. 
