"Attn" on a letter stands for "attention" and denotes the attention line. The attention line specifies who within an organization should receive a correspondence or package.
"Attn," or the attention line, is used specifically when sending a letter or package to a large organization. The attention line makes it clear when the correspondence or package reaches an organization's mail room who the intended recipient is. The attention line is useful for those who wish to correspond with an individual in their capacity as a representative of an organization rather than as an individual. The attention line on a letter or package should be placed above the organization's name. The United States Postal Service encourages senders to not use "attn" when addressing a package, but rather to simply write the specific recipient's name above the organization's name. In the case of a business letter, the attention line is above the salutation.
"Attn" outside of the context of a letter is simply slang for the word "attention." The abbreviation is often used in non-professional internet communications or works of literature that purposefully subvert traditional grammar. Attention is defined as concentrating on a certain thing and ignoring all other aspects of a given environment, a definition which keenly reflects the abbreviation's use in addressing a piece of postage.