The Federal Housing Administration is inside HUD. Under 42 U.S.C. 3533(b) there is "in the Department a Federal Housing Commissioner, who shall be one of the Assistant Secretaries, who shall head a Federal Housing Administration within the Department" and who administers "departmental programs relating to the private mortgage market." So "FHA" and "HUD" are not two agencies, and documents use the names interchangeably for the same insurance programs. What FHA does is insure: the loan is made and serviced by a private FHA-approved lender, and FHA promises to cover that lender's losses if the borrower defaults. The FHA loan used to buy a home, the 203(k) loan that adds repair costs to a purchase, and the home equity conversion mortgage (the FHA reverse mortgage) are all FHA programs with their own pages.
Rental assistance runs through local agencies. HUD funds public housing and the Housing Choice Voucher Program, but a household applies to and deals with a local public housing agency, which federal law defines as "any State, county, municipality, or other governmental entity or public body (or agency or instrumentality thereof)" authorized to develop or operate public housing (42 U.S.C. 1437a(b)(6)). Waiting lists, payment standards and many day-to-day rules are set at that level within HUD's framework, which is why two cities can run the same federal program quite differently.
Fair housing enforcement. HUD enforces the Fair Housing Act alongside the Department of Justice. Under 42 U.S.C. 3610(a)(1)(A)(i) an aggrieved person "may, not later than one year after an alleged discriminatory housing practice has occurred or terminated, file a complaint with the Secretary". The complaint must be in writing, and HUD must acknowledge it and tell the complainant about the time limits and the choice of forums that follow.
Smaller roles that still reach consumers. HUD certifies housing counseling agencies: a "HUD-approved counseling agency" is a private or public nonprofit organization exempt from tax under section 501(c) and "certified by the Secretary to provide housing counseling services" (12 U.S.C. 1701x). The Secretary also establishes, by order, the Federal manufactured home construction and safety standards (42 U.S.C. 5403), the federal code a manufactured home is built to in place of a local building code, which is why it is commonly called the HUD Code. And when a lender forecloses on an FHA-insured loan and conveys the home to HUD to be paid under the FHA insurance, HUD sells it to the public through HUD-registered brokers on its HUD Home Store site.
What HUD does not do. It does not make most mortgages; private lenders do, and FHA insures some of them. It is not the supervisor of Fannie Mae, Freddie Mac or the Federal Home Loan Banks, which answer to the Federal Housing Finance Agency, and it does not set the conforming loan limit. Its one remaining rule-writing role over Fannie Mae and Freddie Mac is fair housing: 12 U.S.C. 4545 directs the Secretary to prohibit them, by regulation, from discriminating in the mortgages they buy. It also no longer writes the rules under the Real Estate Settlement Procedures Act: the Dodd-Frank Act transferred "all consumer protection functions" of the HUD Secretary under RESPA, the SAFE Act's mortgage licensing rules and the Interstate Land Sales Full Disclosure Act to the Consumer Financial Protection Bureau (12 U.S.C. 5581(b)(7)). Older documents and handbooks that call a RESPA rule a "HUD rule" date from before that transfer.