How do health insurance copays work?

A co-pay is a flat payment that is the responsibility of the patient that is assessed to an event; such as a doctor visit or a prescription purchase. Similare to a is typically a calendar year responsibility of the patient; such as 20% or 30% that is paid by the patient after meeting a deductible (if applicable). There is usually a maximum out-of-pocket limit, such as $1,000, $2,000 or higher that is the most a member can pay prior to the plan paying 100% during a calendar or benefit year. Copays do not always count toward the out-of-pocket limit. Example of how a co-pay event might work.... Patient visits doctor for cold. Patient pays $20 co-pay at time of visit.
Doctor bills insurance $100 for "sticker price" of the visit and $20 for labwork.
Because the doctor is a contracted "in-network" provider, the insurance carrier only allows $65 to be charged for the office visit. Since $20 has already been paid by the patient, they send a payment to the doctor of $45. The insurance carrier determines that the $30 is subject to coinsurance and pays 80% and determines that the patient is responsible for the other 20% - or $4. The patient would ultimately receive a bill from the doctor for $4.