Most houses in ancient Africa, Europe, Asia, and many in the Americas, were built out of mud brick. You take clay from the riverbank and mix it with water and straw, and pour it into wooden molds in the shape of bricks, and let it dry in the sun. Sometimes people add some lime, too. When the bricks are dry, you can use them to build houses, or mosques, or whatever. This is a very cheap way to build, although it doesn’t last very long because rain will gradually erode the mudbrick.
Here’s a video of a man in Mexico making bricks
You can make your mudbricks last longer by protecting the mudbrick with fired clay roof tiles or flat foundation stones.
In ancient Sumeria, ancient Egypt, and ancient India, many young children, as young as four years old, worked making bricks and carrying them from one place to another. Often when farmers fell into debt, they had to send their children to work in brick factories in order to pay the interest on their debt.
We also call mudbrick “adobe”. We get that word from the ancient Egyptian word “db”, which meant mud-brick. When Spanish people learned the word from Islamic builders, they added the “a” at the beginning, and then they brought the word “adobe” to the Pueblo people in New Mexico, and used it to describe traditional Pueblo houses (which we also call “Pueblos”).