A leak is a piece of information that is released to the press by an internal source without official institutional authority. Usually, it refers to something that comes from a government source. While technically illegal, leaks are a foundational pilar of the Fourth Estate.
It is a fine line between leakers - people in government who divulge to the media and public government Executive Branch secrets, and whistleblowers, people in government who expose government corruption.
Leakers are ususlly cited in media reports as anonymous sources, or "people with knowledge" and other such language. Leaking, as opposed to whistleblowing, is generally done to criticize policy decisions and influence Congressional action or public opinion, rather than expose outright corruption.
As noted, while leaking is illegal, cabinet secretaries, agency heads, White House and National Security Council staff, even presidents personally have been known to leak secret information, often piecemeal, as a way to lessen the impact and shape public opinion about controversial actions of the Executive Branch. These types of leaks are often cited to "Senior officials."
A symbiotic relationship develops between journalists and their sources: the journalist needs the source to "scoop" the competition and meet broadcast or print deadlines with fresh news, and the source can extend his power and influence outside a government office by shaping public perceptions and events. Ego, career advancement, or ideology can motivate a low-level leaker; whereas lessening the impact of a controversial policy decisions, rather than have it erupt all at once in scandalous headlines, can be the motivation of a "Senior official."
Office politics among civil servants can cause leaking; while the civil service with a bi-partisan staff is supposedly unaffected by politics, when faced with a slow moving or deadlocked decision a staff must make, one member may try to extend their personal power and influence by reaching outside the normal decision making process, and bring public pressure to bare, by leaking.
Illegal leaking can be devastating to law enforcement and national security investigations. Bureacrats sometimes use illegal leaks in so-called "CYA memos," For this a strict confidentiality understanding between reporter and leaker is needed. known as "cover-your-butt" memos to create deniability or the appearance of exculpatory evidence for wrongdoing.
Illegal leaks can be the bread and butter of a legitimate, respectable mainstream journalist. While the risk is all on the leaker, the reporter gets all the glory for digging out the scoop. Under the First Amendment the reporter can't be charged, but the leaker could be jailed. For this a strict confidentiality understanding between reporter and leaker is needed. Both convince themselves they are serving the greater good by informing the public about government abuses or corruption; just as often the duplicitous collusion between journalists and bureaucrats is used for partisan purposes to influence elections.