Congress writes legislation (bills) and votes on whether those bills become law. Bills often go through many revisions in both the House of Representatives and the Senate before reaching the form that is passed and becomes legally binding. Congress may solicit testimony from experts and members of groups who might be impacted by a law during the drafting process. The federal laws currently in force are compiled in a document known as the U.S. Code.
The President and the agencies they oversee enforce the laws of the United States. Sometimes this enforcement looks like stereotypical law enforcement (for example, FBI agents investigating someone who has broken a federal law). But often it involves agencies creating regulations that provide specific detailed guidance on how individuals and entities should follow laws.
The judicial branch interprets the meaning of laws, applies laws to individual cases, and decides if laws violate the Constitution.