stiffness
My understanding about this issue is that it depends on the sizes of the objects you are interested in. For stars and planets, you measure the masses by investigating the relationships between those monsters. For small objects, I think you essentially use Newton's three laws of motion. For example, f=ma. In the space, you slap on an object, and then you check the velocity to come up with the acceleration a. Another exmaple is the free vibration, mx"+kx=0. Suppose you know the frequency w and the spring stiffness k, then w^2=k/m.