Have a look at http://en.wikipedia.org/wiki/Barycenter#Astronomy (and the links from it to find out more about the subject).
If you take our Solar System as an example and consider just the heaviest planet Jupiter, the Sun attracts Jupiter, but Jupiter attracts the Sun as well. Jupiter is much lighter than the Sun, but it's heavy enough to significantly move the Sun as it orbits. The barycentre of the Sun-Jupiter system is slightly above the Sun's surface, so an anstronomer looking at the Solar System from the planet Zogg would see the Sun orbiting (i.e. wobbling) about a point just above the Sun's surface.
To calculate the mass of the planet you need to know it's orbital period and how much the star is moving. You also need the mass of the star, but we can estimate this from the star's brightness and colour. The period of the star's wobble tells us the radius of the planet's orbit, and from that and how much the star wobbles, i.e. how much the planet moves it, we can work out the mass of the planet. The maths isn't as hard as you might think. See http://en.wikipedia.org/wiki/Doppler_spectroscopy#Procedure for the details.
You ask about other methods of determining the mass. In the Solar System we can calculate the masses of planets, asteroids etc by observing their effects on their moons, other planets etc. For exoplanets we can generally only see the star, so that's the only way we have of estimating their mass.