For someone outside the US those names are only associated with the financial crisis. I don't even know what they are and honestly thought they were another Lehman brothers that didn't exist anymore, so your comment read like a joke.
So if a bank offers a mortgage to a customer and the loan conforms with Fannie and Freddie's underwriting policies, Fannie and Freddie will buy it from them them. They then package some of those loans into a loan portfolio and sell it to fixed income investors.
About 70% of US mortgages are supported by Fannie and Freddie.