The effect of bail is such that the accused is released from custody until the conclusion of the proceedings. Bail is always granted with conditions to ensure not only that the accused attends proceedings, but further, to protect state witnesses and the administration of justice.
In terms of the conditions, the accused person must attend court on the specified dates and not leave until he is dismissed by the court, otherwise he stands to lose the money he has posted for bail. The accused is further prohibited from having any interaction with neither the complainant nor the state witnesses, either directly or indirectly (through family members or friends, etc). If any of the conditions imposed by the court are violated, the court may cancel bail and order that the accused be remanded into custody until the finalisation of the matter.
As previously mentioned, bail is not a form of punishment and therefore, once the matter is finalized, the money is returned to the bail depositor. Bail money will be returned regardless of the outcome of the matter.