Is surgery the only way to get rid of a cyst?

No. Sometimes a cyst will go away on its own. Sometimes a cyst can be drained in the office by an ultrasound guided needle. Sometimes it can be drained by ct guided needle as well. It depends on the situation. But draining a cyst may not always get rid of the cyst. It may only collapse it. The only way technically to get rid of the cyst wall is surgery. But that may not always be necessary.
What kind? Cyst means collection of fluid. There are different types of fluid collections in different parts of the body, so need to know where the cyst is and how large in order to give an idea what if anything can be done.