I mean when referring to studying things like dinosaurs and the general history of life on Earth
"Natural history" is just one term for what we now usually refer to as part of science. Other examples include "natural philosophy", "natural magic", "alchemy", "chemistry". From approximately the mid-19th century onwards, "natural history" can be safely associated with "science" rather than with "history". This is because from around this period the concept of "science" becomes more well defined as the study of the natural world, allowing earlier terms, such as "natural history" to be safely associated with what we now refer to as "science".
One way of talking about this quite complicated question might be to look at natural history collections. Natural history collections, i.e. collections of natural objects such as bones, plants, stones or shells, initially emerged out of collections that contained a wider range of objects that were popular during the 17th and earlier 18th century. These are sometimes called "Cabinets of Curiousity". These collections consisted of all manner of interesting objects, from anthropological objects through natural historical objects like dinosaur bones, through oddities like farm animals with two heads which we'd now associate with circus-type environments. These latter 'monsters', Lorraine Daston writes, were included in serious collections because Francis Bacon's agenda for the study of the natural world included a recommendation that people must study the weird in order to understand the ordinary.
In the 18th century, the weird objects were abandoned from most serious collections, leaving the anthropological and natural historical objects. In the 19th century, these two types of collections were partly separated--although many 19th century museums (for example the Royal Ontario Museum) still hold both natural historical and anthropological collections under the same roof, betraying their close historical relationship.
Another way of looking at this is that the thing we call "history" today has typically largely been a literary pursuit, relying on documentary evidence. Natural history is more akin to anthropology/archaeology, in that it relies on material objects such as those that made up the cabinets of curiousity. In this respect, natural history is an archaeology of the natural world, or archaeology a natural history of people. Neither are "history" in this stricter literary sense.