History is a discipline in the academy that is some times a social science and sometimes a humanity. However, there are many other social sciences (economics, political science) and many other humanities (anthropology, theology). What differentiates history from its close relatives in the social science and humanities. How can we tell that something is history and not archaeology? How can we tell that something is economics and not history? Do other disciplines use historical methodology? Does this alone make them historians?
This is a really tough question to answer. History is not just the study of what happened in the past and when it happened. Sometime around sophomore or junior year of high school, more perceptive students pick up on the fact that history is about the interpretation of various events and the sheer breadth and variety of interpretations is what makes the study of history interesting.
In terms of how we can differentiate history from other areas of study. The short answer is that we really can't. History itself is a blanket term that covers a lot of different areas of study. For example, the study of the mathematical concept of volume and the study of, let's say, World War II can both focus on the certain moments that "motivated" these events. But one may require quite a substantial understanding of mathematics; both however are indisputably the study of history.
As you mentioned history can be considered a social science. With other social sciences like sociology, economics, psychology, history uses elements of the scientific method. In fact in terms of research methodologies I would strongly recommend The Craft of Research by Booth et. al. that really lays out indiscriminately of field of study, the various elements that constitute good argumentation which is what historical research is based upon.
I always consider history to be a social science. Science is always changing. New frontiers are always being discovered and old theorems disproved. History is the same. For example, in grade school, many kids are taught that the ancient Pyramid of Giza was built by enslaved Jews. But in fact, pyramids were largely built by skilled laborers and farmers who were drafted to perform the duties of pyramid construction. This huge change in the way we think about who built the pyramids didn't just happen overnight. Extensive research was conducted and different areas of study (including archaeology) were incorporated to provide the evidence to convince people that this in fact was the truth. History is not set in stone. In fact, history constantly evolves, just like the sciences, to reflect our interpretation of the world. After all, if we didn't support historical discoveries with evidence who would believe them?
In short, there is no easy way to differentiate what is "history" and what is everything else. The fact is that because history is the study of the journey of humanity through time in all its various angles, it invariably must cover everything that is of interest to humanity. So there is the history of science, history of computing, history of ancient China, history of archaeology, even history of the various fields that were studied in relation to archaeology before archaeology became recognized as its own field of study.
I know this was long, but I hope it helps you understand that history is not an isolated field. It shares its research methodology with the sciences and draws on every conceivable area of study to formulate interpretations that can be supported with hard evidence.
P.S. this may also help you understand what historians do: https://medium.com/editors-picks/f69e08b57b74
A good definition of history that historians use is 'History is the study of change over time.' Historical studies, to a large extent, rely on theory and methodology. A series of facts is a narrative, it is not a historical study. Analyzing those facts, placing them into context, understanding the underlying factors that contributed to those facts occurring, all of that and then some is encompassed by the study of 'history.' Furthermore, history is very much interdisciplinary. Various graduate programs in history will encourage students to take classes in other disciplines (anthropology is a perfect example) and incorporate what they learn outside the field into their dissertation, articles, reviews, books, etc. Historians usually have to become immersed in the subjects they study. Thus economic historians have to have a general and at times detailed understanding of economics that's relative to the time period and location they specialize in. The same applies to politics, labor, medicine, technology, philosophy, warfare, etc. I can't comment on what those outside the discipline of history do, but I can say that 'outsiders' who try to write about history usually fail in that they do not understand how to incorporate either theory or methodology. What readers are left with are either popular histories that add nothing new to the canon or failed attempts to discuss historical subjects/ideas.
I am answering this from the perspective of an American sociologist who often studies historical topics.*
Developing Theory versus Interpreting an Event: Social scientists study cases so that they may contribute to a larger body of theory: for example, Skocpol's States and Social Revolutions was a key development in the theory of historical institutionalism.
Historians may use theory, but they don't usually set out to develop a theory. For example, I was pleased by how much political sociology was implicit in Christopher Clark's The Sleepwalkers: How Europe Went to War in 1914. But Clark clearly is not trying to develop that theory any further. Just look at the titles of these two books. Skocpol is trying to explain "states and social revolutions," while Clark is trying to explain "How Europe Went to War in 1914."
Sample Size: Historians are allowed to write monographs, but social scientists are not. To explain an event, a historian's explanation may look something like "factors leading to the Russian Revolution were A, B, C, D, E, F, G, . . ."
But social scientists generally want to develop a theory by making some claim like "Revolutions (Y) are more likely in the presence of international wars (X)." You need at least two observations to make this claim: one case with (X=0,Y=0) and one with (X=1,Y=1). Of course, that's not very convincing, because maybe it's actually Z that causes Y, and Z is usually found with X. Now we need to find a case with (X=1, Z=0, Y=1), etc. Basically, social scientists are obsessed with degrees of freedom because the more observations, the more alternative hypotheses you can rule out. This is why social scientists are much more likely than historians to fit multivariate models on very large sample sizes.
Primary versus Secondary Research: Historians set out to understand an event like WWI better. The way to to do this is to head to the archives and uncover new sources. Social scientists do sometimes go the archives, but a large portion of any historical project is invariably based on secondary sources. Again, this is because if you want to explain an event, you prioritize depth of knowledge. To develop a theory, you prioritize breadth of knowledge.
Embracing Complexity versus Searching for the Central Tendency: Historians, with their depth of knowledge, know how facile it is to make generalizations about a topic. Try telling a historian that Democrats in the 1830s were the party of the common man, and they'll tell you "Well this prominent guy was a banker, and this party leader was a manufacturer, and in fact if you look at the Louisiana Party . . ." The social scientist will often say, "Let's bracket that for now, because I need to get around to discussing seven other cases." The premise may not be 100% true, but as pragmatists the social scientist is primarily concerned with whether the premise is good enough for the purposes of this particular study. To atone for doing violence to the irreducible complexity of social reality, sociologists must pay ritual obeisance to our patron saint, Max Weber, whose concept of the ideal type absolves us of our sins.
In closing, let me say that I love historians but that there will always be some amount of mutual incomprehension between them and social scientists. I often shake my head at the methodological naivety of certain claims made in historical works. ("Come on, how are you going to claim that quote you found is representative of a greater social phenomenon? How can you convincingly assess its significance? Prove it!") and historians endlessly shake their heads at my incomplete grasp on the era I study--and yes, my willingness to reduce complex phenomena into "central tendencies" and "ideal types."
But hey, that's professionalization and the division of labor for you! I think the study of history is the richer for having two such diverse approaches.
* European sociology is quite different from American sociology, so I make no claims to represent non-American approaches to the discipline.
History is a science because it contains the scope, methodology, it has structure and also has its experts. it also comprises of its own vocabulary and thus it is homogenous.
History as a discipline can be differentiated from other disciplines firstly due to its uniqueness of being interdisciplinary- it comprises may disciplines like that of medical, military, cultural and linguistic history. Secondly history is always an expression of "change over time." Finally history is a study which involves theories and methodologies; this is obviously not seen in other disciplines of social science and humanities.