Can a magnet be tuned to attract only to one other magnet? So think magnet X is only attracted to magnet Y , but magnet A is not attracted to either magnet Y or X. Only X and Y can attract each other???
 A: No, there is no sense in which you can "tune" a magnet. A material is either magnetic or it's not, and if it's a magnet then it is attracted/repelled by all other magnets. You can make electromagnets which can be switched on or off, but when it is on it acts like any other magnet.
EDIT: Peter Shor's answer is a neat trick. I had assumed you were talking about a individual magnets. If you have an assembly of magnets you can arrange them in a tricky way as Peter shows. Maybe this fits into your definition of "tuning."
A: Yes, it's trivial to "tune" a magnet.   Of course this only applies to AC electromagnets.  Driven synchronously, they'd either attract or repel each other depending on the phase relationship of the driving supply.   Shunt-wound AC/DC motors, when run using AC, are a common example.   
But if you mean "bar magnets,"  then no.  Permanent magnets are essentially DC, and lack an operating frequency.
Hmmm.   If you had a rapidly-spinning permanent magnet in free fall vacuum conditions, you could either attract or repel it using an electromagnet where the AC drive was synchronized to the rotation frequency.
A: Such things are called programmable magnets or correlated magnets. They have a sequence of alternating polarities of N and S, which will only strongly attract magnets with the opposite sequence:
N S S N S N N S N S S S N
S N N S N S S N S N N N S 

But as Michael Brown's answer says, there is only one kind of magnetic field, and it will repel and attract all other magnetic fields; you have to use spatial coding with this magnetic field to obtain these correlated magnet pairs. 
EDIT: And looking at wbeaty's answer, with electromagnets you could use temporal coding, too. If an electromagnet was driven by an alternating current with an irregular pulse sequence, then it would only attract/repel magnets driven by the same irregular pulse sequence. I don't know whether anybody has thought of/patented/tested this idea. But I don't see why it shouldn't work.
A: No. Magnetism is a fundamental force, so either an object is magnetic or not. Magnetism does not care whether it's magnet X or Y or A that is to be affected.
Edit: Apparently, there is need to specify what you consider as a "magnet". If you apply the definition to permanent magnets only, my answer is correct. 
Electromagnets can be turned of an on, so you could use them in an application where you need to have a dynamical interaction between X and Y and A. Still, as long as the electromagnet is turned on, it is a universal magnet and will attract all other magnets nearby, as the magnetic field is universal to all magnets. 
Then again if you consider composite objects you can have magnets that "fit" together and others that dont, as Peter Shor explained. But there still all the north poles attract all the south poles and it is only the superposition of those individually universal forces that allows the result to be specific.
