Where the teachings come from
Before I delve into what the teachings of Islam are it is necessary to note that in Islam there is no Church with any authority to pronounce judgements on matters of moral law. There are no priests, bishops, popes, rabbis, etc. It is recognised as a basic teaching of Islam that only Allah has the right to make something forbidden for all time and only Allah has the right to make something allowed for all time. So to find Islam's teachings we need to go to the material sources. This provides a framework of permanent law within which people can act. The Islamic State may make temporary laws so long as they don't contradict this framework.
If we look at the history of shariah (Islamic Moral Law), it started with the laws enacted by Muhammad and it is his precedent and the precedent of the immediate successors to Muhammad (called the Khulafa al-Rashidoon) that provide the best examples of how shariah should be implemented. This period only lasted a few decades after which rulers came to power who were motivated more by self interest than by setting a moral example and more crucially were not scholars of Islam. This had the effect that the jurists and scholars no longer trusted the head of state with law making. The heads of state were generally quite happy to operate in the framework provided by Islam and hand over the development of laws to the scholars and jurists. Where they deviated by making unislamic decrees they were eventually persuaded to return to the law as defined by the scholars.
A key aspect of this was the lack of a simple resolution to scholarly disputes about what the law should be (for example a judgement by the head of state). This resulted in great efforts being made by scholars of Islamic law to find ways of reaching agreement through establishing agreed methods for asserting the authenticity of various potential sources of shariah and to develop agreed methods for deriving and elaborating the moral law of Islam from these sources.
At a certain point in the history of the Muslim world, despite these methods, the disagreements became too many and people became confused as to what they should really be doing. Instead of trying to follow what the sources said, they began to simply follow the more established scholars. This was the beginning of a period called "Taqlid" meaning "imitation" where people followed without understanding. This caused a deadening of the Muslims intellect and the general decline that reached its lowest point when the whole Muslim world was colonised except for Arabia.
What has always been needed is a political authority that takes responsibility for making law and to be an example and who has the trust of the jurists and scholars to do so. Then the obedience required of Muslims to that leader should override following the judgement of any particular scholar since the leader would be the arbiter in scholarly disputes about what the law should be. This, however, is not the current situation and so, for the time being, we must navigate our way through the varied understandings and teachings of Islam, picking those things which are most reliable.
There are many important principles and classifications that I could explain to you here but I shall introduce them as they are needed in the following sections.