The Contact play or attachment is a move which is played in immediate contact with (that is, directly next to) a stone of the opponent (without being in such a relationship with a friendly stone).
A contact play 'out of the blue' is often not the proper choice of technique. By touching the opponent's stone, you are forcing it to defend and thus get strong, probably stronger than your own stone. See don't attach when attacking and what to do instead.
However, if the opponent already has a strong position in the environment, and you want to invade, then it is not rare for a contact play to be the best move. Strengthening the opponent does not worry that much in such a case, because his strength will probably be overconcentrated. The advantage of the contact play in this case is, that it tends to give your own stone some strength as well. As an added advantage, it sometimes gives you a bit more strength than other moves would. See contact play for sabaki.
As a comment for beginners: using too many contact plays is part of the problem of playing too close.
There is a big difference between the supported contact play, where there is another stone of the same colour close at hand (for example a one-point jump or knight's move away), and the unsupported contact play. See also
- Keima attachment
- Underneath Attachment
- Side Attachment
And more related: