There are only two basic ways: divorce by agreement or divorce by judgment. Either way, there will be corresponding written documents. After you get the legal and valid documents, you can go to the civil affairs department to get a divorce certificate.
But only if you are divorced. If the other party disagrees, you need a court decision. Without corresponding legal documents, the Civil Affairs Bureau will not change your marriage relationship.