Surgeons use small plastic tubes to help drain away fluid after an operation: without them, the fluid might gather up and cause infection. Or, in the case of an operation on the lungs or chest, air might gather up and squash the lungs.
They are usually special small, flexible plastic tubes that the surgeon places during the operation and then leaves poking out your skin, attached to a small bag. You can get more information regarding post-surgical drain from https://www.centese.com/.
Image Source: Google
Some operations involve quite 'juicy' parts of the body: areas where the body usually makes lots of fluid or juices. An example would be surgery on someone's armpit (axilla): this is often done as part of breast cancer surgery. The armpit makes a lot of fluid after being operated on. Without a drain, the fluid might gather up in a large pool and be painful.
The pressure of the fluid inside might stop the wound from healing properly. So the surgical drain allows extra fluid to drain off harmlessly. A few days later, when the fluid production has faded away, the drain can be removed painlessly.
Not all operations require a drain to be in: your surgeon will advise you if one is necessary. Your surgeon will discuss with you before the operation whether you will need a surgical drain and where it will be.