Would there be a trial, or investigation? Would it be straight to execution? Or does it depend on the Government that was in place during that time?
The specifics depend on a great variety of things, ranging from the severity of the crime to the status of the victim, as well as the jurisdiction in which it took place. The following response is just a general introduction to the themes of the era rather than the specific details. If you want to get into specifics, see the reading suggestions below.
There were three institutions involved with the observation of justice in the land during the early and middle Bronze Ages (~3300–1500 BCE): local councils, judges and courts, and the sovereign ruler, which depending on the time and location could be a “priest” (ensi) or a “king” (lugal). The overall structure of laws and justice was relatively fixed throughout the early and middle Bronze Ages, but we have only a fragmentary understanding of the whole so many of the reforms and changes may be invisible to us.
Generally speaking, for minor crimes like stealing inexpensive property from another person, the local council would investigate and you'd be fined if they believed you did it. If the theft was something minor, like a goat, the fine was roughly a third of the value of the stolen good, but if you couldn't pay it then you'd be executed. If the council could not compel the convicted person to act then the council would appeal the case to a court. You could also appeal the decision to a court yourself if you maintained your innocence, and we do have a few records of this being the case so it really did happen. Depending on the time period and place this could be expensive or difficult so it was not always an option for everyone, especially non-elites.
If you stole something more serious, like temple property or the property of the palace, then you'd have a trial in court, and if you were found guilty then you'd be executed. During the trial, you would swear some words before gods and relatives, then both sides would provide testimonies and witnesses would be called to verify the statements. In important cases, letters could be sent to authority figures requesting the participation of a non-local witness or to provide official statements. Frequently texts were submitted as evidence during the trial. In the end, the presiding judge would render a decision (literally “judge a judgement” dīnam idan) and a court appointed “soldier” (rēdûm) most likely carried out the deed.
In cases that could not be cleanly decided then they would appeal to the gods and some kind ritual would be performed, but we have far fewer records about the details of this process. One type of ritual that is known was the water trail where the accused would be tossed into a river and if they were able to swim back to shore without drowning they were assumed to be innocent, but we have no idea how widespread or common this sort of practice was.
For further information, see:
Postgate, N. Early Mesopotamia (1992), ch. 15 'Laws and the Law'
Roth, M. Law Collections from Mesopotamia (1995)
Greengus, S. “Legal and Social Institutions of Ancient Mesopotamia” in J. Sasson (ed.) Civilizations of the Ancient Near East Vol. 1 (1995), p. 469–484.
You can read the Code of Hammurabi, a Middle Bronze Age summary of ideas concerning the law here: http://www.fordham.edu/halsall/ancient/hamcode.asp