A good way to show how this is achieved is to show you a case study, below I will detail how we came to make the theory that Mercury has a liquid core.
It is first important to note that we are never definite of the properties but we are able to use the data to infer and create a theory that we believe to be an accurate representation of the truth.
The MESSENGER spacecraft was launched for the purpose of analyzing MErcuries Surface, Space ENvironment, GEochemistry and Ranging (hence MESSENGER).
Messenger had a number of pieces of equipment on board to allow it to conduct it's experiments, as detailed in the below image:
Mercury Laser Altimeter
So how does the MLA aide us in determining if Mercury has a liquid core? Well the purpose of the MLA is to:
track the planet’s slight, forced libration – a wobble about its spin axis – which will tell researchers about the state of Mercury’s core.
How does a Laser Altimeter work?
A laser altimeter is operated from a plane, a helicopter or a satellite. It determines the distance to the [Planet's] surface by measuring the time-of-flight of a short flash of infrared laser radiation. The instrument emits laser pulses which travel to the surface, where they are reflected. Part of the reflected radiation returns to the laser altimeter, is detected, and stops a time counter which was started when the pulse was sent out. The distance is then easily calculated by taking the speed of light into consideration.
Using this technology one can build up a 3D visualization of a planets surface
What scientists discovered from this mapping is that:
The planet's crust is thicker in low latitudes and thinner at the poles, a distribution that suggests the planet could have a liquid outer core. Its core is also large relative to the planet, comprising 85 percent of the planet's radius, much more than Earth.
How did they come to this conclusion? This paper explains in depth. (The full version is free, but requires signing up to the site, signing up is also free and has no costs and has the ability for you to turn off receiving emails and newsletters from them)
The most notable part is this excerpt and image:
Resulting moment of inertia parameters for more than 1 million Monte Carlo models that include a silicate crust and mantle, as well as an Fe-rich core that may contain solid and liquid layers are shown in
(A) Outer radius of Mercury’s liquid core. (B) Average density of the solid shell that overlies the liquid core
Conclusion
Essentially, specific readings taken by a Laser Altimeter allow us to map out the three dimensional shape of a planets surface. Analysis of the shape shows us that the crust is thinner at the poles which is likely due to a liquid core.
On top of this, Mercury is believed to have a small magnetic field (1% of our own) and this might be due to a liquid outer core circulating a solid inner core, acting like a dynamo. Though there is still much speculation given over what causes the magnetic field so this is unreliable to use for a solid footing.
Aside from that there is the logical thought process that larger planets are capable of creating huge amounts of heat and pressure at their cores which create a molten core, or at least a molten layer. This is why there is much skepticism over Mercury because it is such a small planet that its core should have solidified long ago.