Actually it's , Like magnetic poles repell & unlike magnetic poles attract , same like charges , but in an electromagnet there is charge present on it , not on natural magnets charge is present . Flow of current is responsible in electromagnet for its magnetic field not in natural magnets .
Actually A magnet always exists in both poles N& S , never a mono -pole , i.e. Single north or single south you will get , its not possible in magnet , If you break a magnet , again Two poles will be formed north & south .
Magnetic field lines Start from North & end in south ,
When , same poles are placed together , field lines repell together & opposite attract , just like charges , Field lines are outwards in North pole & Direction of field lines is inwards in S pole , it has been observed experimentally ,