A privilege is a right to prevent evidence from being used in a proceeding (even if it has been disclosed publicly by someone who does not "own" the privilege, e.g. the President in whose administration the communication that is privileged occurred, in the case of "Executive Privilege"), even when it is subpoenaed. It is enforced by a motion or request in a proceeding to prevent the evidence from being considered.
So, if information protected by Executive Privilege is leaked without the permission of the President, it still can't be used in court against the United States or the President.
Voluntary disclosure by someone who "owns" the privilege (e.g. in a tweet or public speech or legal document filed with a court or Congress) waives a privilege, as does voluntarily placing a privileged matter at issue on the part of the person owning the privilege. For example, if you assert a defense of reliance on the advice of counsel, you voluntarily waive the right to assert attorney-client privilege with regard to what you were told by your attorney.
The existence and scope of a privilege is normally determined by the tribunal before which the proceeding is taking place, subject to any appeals available from the tribunal (if any).
There is no law criminalizing the disclosure of privileged information (including information subject to the common law executive privilege) per se.
A privilege is separate and distinct from a duty to refrain from disclosing information, although the two often overlap.
For example, there is both (1) an attorney-client privilege that prevents confidential communications between an attorney and client about legal matters from being disclosed in a proceeding without the client's permission (in federal court this arises via court rule, in Colorado where I mostly practice, it is a matter of statute), and (2) a duty of an attorney to keep client information confidential except in special circumstances that arises from Rule of Professional Conduct 1.6.
There are matters that a lawyer has a duty to keep confidential in the absence of a valid subpoena, even if the information is not protected by the attorney-client privilege and/or has been publicly disclosed by someone other than the client. A lawyer could lose his license for violating Rule of Professional Conduct 1.6 (every state uses the same numbering system for such violations), and could be sued for violating the privacy rights of a client in a way that causes harm to the client, but it is not usually a crime to disclose such information (unless it is a trade secret or a national security secret).
The law governing what punishments an individual faces for disclosing information revealed in secret by the President to an individual is separate and distinct from the scope of the Executive Privilege and is governed by different laws. Often it is governed by case by case non-disclosure agreements entered into contractually by the person who is privy to the secrets (which usually have non-criminal remedies like lawsuits for money damages and injunctive relief). The consequences also depend on the nature of the material disclosed (national security matters and trade secrets are governed by different laws than other secrets) and the person to whom it is disclosed (a disclosure to a Taliban leader with whom the U.S. has an authorization for use of military force against is espionage, which is different than a disclosure to a member of Congress which is merely a "leak").
Typically, punishments for violating a duty of confidentiality are imposed in a collateral case to one in which someone proposed to use information protected by a privilege.