Start with a form, usually made of wood. Don't make it too big. A mud brick should be somewhere around the size of .. Well,... A brick. Otherwise, it might be prone to cracking under uneven load. Next, sift some dirt (rocks weaken bricks) and mix water into it. You want about 1/4 as much water as you have dirt but that will vary. You are looking for a pasty mix, not a soupy one. It should be just thick enough as NOT to flow on its own. It's a good idea to strengthen the mix with dried straw or grass, well mixed in. You can add a small amount of cement but it usually is not necessary. Put this in the form and work it in. The more you work it, the more the dirt and clay particles line up with each other and the more water will float to the top. This makes the brick stronger. Let it dry in the sun. Later, you will remove the brick, stand it on its side and let it sun-dry for a couple weeks before you use it. If the center is not dry, the brick will crumble under stress. Different dirt makes better bricks. That's too much to describe here.