A magnet cannot attract/repel another magnet when it is very far from it. It can only influence (attract/repel) till a certain distance. The magnetic influence is also termed as 'magnetic field' and the range till which it acts is called the 'range of the magnet'. So if a non-magnetic material or a magnet is present beyond the range of magnet A (say) then they are not influenced by the magnet A.
The amount of influence is magnet shows is referred to as their 'power of attraction. So, if magnet A can influence more than magnet B then magnet A is stronger and its power of attraction is more.