The term is derogatory; possible beneficiaries might include research projects, demonstration projects, parks, laboratories, academic grants or business contracts.
The key difference between an earmark and a general budget line is the specificity of the recipient, which is usually someone or something in a specific Congressman's district or a Senator's home state.
Congress includes earmarks in both appropriation and authorization bills OR in report language (the committee reports that accompanies reported bills and the joint explanatory statement that accompanies a conference report). Because earmarks can be tucked away in report language, the process is not transparent (easily identified by constituents).
However, tax breaks that specifically reference a recipient or pet projected are also sometimes called earmarks, because they satisfy characteristic (b) above.