Since Galileo first pointed a telescope at the Moon and saw its marked surface people have been debating how the craters they observed formed, for much of history there were two interpretations; either an impact crater or formed by volcanic eruptions.
It was not until the space age when close up photos (and later moon landings) revealed most of the creators on the surface were formed by impacts (volcanoes do exist on the moon but form very different features). But what are the differences and how can you tell remotely without landing?
On first glance, both types of craters can look very similar, both would form round features with rims. Both can have ejecta around them, formed from the material thrown out from the inside (either the material the surface is made from or ash from volcanic eruptions).
However when you think about how they formed you can understand some of the differences when looking at them: volcanoes are explosive, expansions of material often with repeated events close to or in the same place.
Most volcanoes are built upon the landscape and so often the inside of the crater will be at a higher altitude than the surrounding terrain (with the exception of Maars due to interactions with water under the ground and features called calderas which are collapsed volcanoes). Whereas impact craters are formed by a surface beeing excavated by an impactor, whilst the sides of the crater can be built up from material thrown out of the crater floor itself will be lower than the surrounding terrain.
Volcanoes often show evidence of their volcanic nature around them, whether it is lava or ash flows inside and on the sides of the volcano. The volcano itself will be built up of volcanic rock. An impact craters wall will be made up of the same material excavated from the site. there are of course exceptions to this, for example on Mercury some of the impact craters are filled in with lava which broke through the bottom of the crater, however, the wall of the crater is of different material to later lavas which fill in the basin.
Volcanic craters can also be asymmetrically distorted by the wind or the direction of the eruption (or deformed by later eruption events). The overwhelming majority of impact craters are circular. Larger craters also have a central mound formed by the rebounding material which you don’t see in volcanoes (though new volcanic cones can grow in existing craters).
There are lots more features of craters evident when you get a close-up view on the ground but they are hard to observe from satellites where most of our planetary data comes from. As with much of geology, by observing a combination of these features a story of where a crater came from and how it formed can be built up from remote sensing data.