Auguste Comte wanted to make sociology into a more scientific study. He wanted to make sociology more like the study of biology. Therefore, he advocated the scientific method and analysis of data. He did not intend to study societies in order to change them. Rather, just as the physicist seeks the laws governing the universe, Comte was seeking the laws that govern human societies. Knowing these laws, humans would be better able to work with these laws and make society better. Comte chronicled three stages of human development: theological, metaphysical, and positive. In the first stage, humans supposed spiritual causes for empirical events. In the second stage, they supposed empirical events arose from some underlying natural, or metaphysical, substance/cause. In the third stage, humans looked for laws and causes in real, 'positive,' conditions, laws based on science. Comte wanted sociology to be a positivist study.
Positivism is in the same area as empiricism and naturalism because all three philosophies study physical properties, laws, and the way humans interact with the world. Positivism is therefore opposed to anything metaphysical, which makes it generally opposed to anything idealistic; that is, anything that can not be known or observed. If it can not be observed, it is not useful in scientific inquiry. Positivism, as sociology, is a science. As a complete science of human societies, positivism has to look at all aspects: economics, physiology, class, psychology, etc. (Although, in his time, Comte did not give much attention to psychology.) The attention to science as a sociological inquiry has been very useful in focusing on observable causes and affects in society.
Positivism also led to Logical Positivism, a linguistic philosophy ruled by the same loyalty to scientific study as the positivist social sciences were/are. Logical positivists look at sentences and determine that they are true only if they appeal to some real, physical law or form of sense experience, or they determine a sentence is true if it adheres to the rules of grammar. The extreme focus on science by the Logical Positivists also reveals a limitation. Anything remotely evocative, emotional, relative, or abstract, they tend to regard as unscientific and therefore meaningless. As much as an extreme idealist is guilty of putting too much emphasis on things we can not know, the logical positivist is as guilty of ignoring anything remotely subjective. (After all, if human experience is largely subjective, the logical positivists are missing something.)