The plaintiff is the person or entity seeking a determination of their rights according to the laws that govern the subject matter in which they are involved. The defendant is the person or entity against whom a claim has been made. In litigation there can be several plaintiffs and several defendants. Which laws apply to a given matter is determined by many factors. Those factors include, but are not limited to, location of the parties, location of the real estate, location of the subject matter, and the nature of the matter.
Federal laws apply exclusively to some areas of the law, such as bankruptcy.
State laws often apply to people and matters within a particular state. Each state in the union has different laws. Both federal and state laws are applied within the State of California. There are special federal courts to handle federal law and state courts apply state laws. Municipal and Superior Courts are the two primary courts for application of California Law.