Political parties have both a state law identity and a federal law identity, which are distinct.
State Law Foundations For Political Parties
For the most part, political parties are organized at the state law level as either non-profit corporations, or as "unincorporated non-profit organizations" (which are also a popular form of organization for unions).
Unincorporated nonprofit associations are the moral equivalent of an unincorporated general partnership in the for profit sector, as a default when an association is not an entity registered under a state's organizational laws (see also here). There is a model act which has been adopted in its current version, or a previous version, by many states.
The Unincorporated Nonprofit Association law of the District of Columbia is particularly relevant as many national political organizations in both parties, in third parties, and for special interest groups and think tanks are headquartered in the District of Columbia and governed by this law by default. In provides that:
§ 29–1104. Governing law.
(a) Except as otherwise provided in subsection (b) of this section,
the law of the District shall govern the operation in the District of
all unincorporated nonprofit associations formed or operating in the
(b) Unless the governing principles specify a different jurisdiction,
the law of the jurisdiction in which an unincorporated nonprofit
association has its main place of activities shall govern the internal
affairs of the association.
Either form of non-profit can be organized under one of several pertinent non-profit entity forms under the Internal Revenue Code (not under 26 USC § 501(c)(3), however, and often under 26 IRC § 529).
An overview of the organizational features of incorporated and unincorporated nonprofits prepared by the American Bar Association can be found here.
In addition to these two forms of organization, individual candidate political campaigns are sometimes organized as trusts, or as limited liability companies.
Federal Political Party Law
Federal election laws largely discuss political parties and political campaigns in relation to campaign finance rules and in spelling out some of the practicalities of how the electoral college operates.
They have this limited scope because elections for federal elective office are primarily governed (as set forth in the U.S. Constitution) by state law, rather than by federal law (which may establish certain rules that apply in federal elections, even though federal elections are administered by the states).
Many political organizations that fund election campaigns are required to register with the Federal Election Commission, which does not distinguish between these organizations based upon their state law form of organization.
State Political Party Organizations Have Many Features Dictated By State Election Laws, With Residual Rules For Matters Not Addressed Governed By State Laws Governing Incorporated And Unincorporated Nonprofits
State parties are organized under their respective state laws (not in a uniform manner). Significant elements of political party organization are mandated by state and federal election laws making them quasi-governmental entities with close parallels to governmental "special districts".
State election laws heavily regulate the structure of, and mandate procedures that political parties must follow, primarily to be recognized for purposes of ballot access and to integrate them into government funded intra-party primary elections. Typically, these laws have one set of rules and mandates for the two major political parties and one or two other sets of rules and mandates for minor political parties (sometimes as a single category and sometimes further broken up into medium sized and very small political parties).
These state law mandates are superimposed upon the non-contradictory aspects of general corporate law applicable to non-profit corporations or to unincorporated associations, as the case may be.
The National Political Parties Are Federations Of D.C. Unincorporated Nonprofit Associations And State Political Parties
State political party organizations and national party organs (such as the DNC and DLLC and National Association of Democratic Governors) are constituent entities of the national party which is kind of a federation of state parties and national organs. Each of these national organs and each state party has a freestanding financial and organizational existence.
The organizational documents of the national Democratic Party (which has well defined relationships with many constituent organizations), does not expressly identify a jurisdiction in which it is organized and does not appear to be incorporated as a non-profit corporation.
By default, most national political parties, and their national constituent organs, should be subject to the laws of the District of Columbia where the major national parties and many (all?) of its constituent national organs maintain their headquarters. They all appear to be unincorporated nonprofit associations.
The GOP's structure is similar.
Legislative Parties Are Subdivisions of the Legislature In The State and Federal Government Respectively
Legislative rules elected by the respective state legislative houses and the two houses of Congress (i.e. at both the state and federal level) also more or less comprehensively regulate the operations, rights and organization of legislative political parties which is to say, the organized rule of elected legislators who are members of a political party (or are not) to each other and to the legislative body as a whole.
Legislative political parties do not generally have a separate financial existence from the legislative body itself and are really best viewed as "internal divisions" of the legislature in much the same way that Chevy and Pontiac are internal divisions of General Motors Corporation without a distinct identity as a separate corporation or entity from the parent.