Laws and regulations are similar in that both are mandatory requirements. However, there are some minute differences between them in terms of separation of powers or government structure. Generally speaking, laws refer to the rules written and passed by the legislative branch, while regulations are the rules formulated by the executive branch.
For example, US Federal laws are bills that have passed both houses of Congress and been signed by the president. Individual laws, also called acts, are arranged by subject in the United States Code (USC), e.g., Federal Information Security Management Act of 2002 (FISMA, 44 USC § 3541, et seq.).
Regulations are rules made by executive departments and agencies and are arranged by subject in the Code of Federal Regulations (CFR), e.g., The HIPAA Security Rule is located at 45 CFR Part 160 and Subparts A and C of Part 164.