Most criminal cases resolve short of trial, many with a plea agreement including probation. Even trial convictions can include a probation sentence. Probation means - if you stay out of trouble and timely comply with its terms and conditions - avoiding worse consequences like jail or prison. So, what happens if you mess up and are accused (and possibly arrested and jailed) of violating probation?
First, you'll get written notice of the alleged violation(s). This is usually in the form of a complaint to revoke probation filed with the court overseeing the case, and a summons requiring you to appear in court to answer the allegations made by the probation department and prosecutor's office.
Second, you're entitled to a hearing - evidence and all - but typically not a jury, and under a lessor preponderance of evidence versus reasonable doubt standard. An exception is if the alleged violation is a new offense, which triggers additional due process. In Colorado - a more or less typical state when it comes to probation - details of the process can be found at CRS 16-11-206 and Criminal Procedure Rule 32. Federal probation is an entirely different, and rare, creature.
Third, if revoked, you can be re-sentenced per the charge or charges you pled to, including jail or prison, fines etc.
Meantime the prosecution likely will try to negotiate with you (your lawyer if you have one) a resolution short of proceeding with a hearing. This mainly is because, if they or the judge wanted you in jail or prison in the first place, you'd probably already be there. Instead, per a new agreement the terms and conditions and length of probation may be "continued" or extended, additional classes or treatment required, jail alternatives like day reporting, work release or in-home detention imposed, etc. In other words, you usually get at least a second chance on probation, subject as always to judge approval.
One of the worst things about being a judge must be listening to people explain or excuse or try to justify why they violated probation (which sentence often really is a gift in the first place). Judges do this a lot (get to court an hour or so early and see for yourself).
Especially in cases where the alleged violation is missing appointments, failing to complete classes or treatment in time, not paying what is required, and the like, it may be better to admit, apologize and get on with it. Cases involving "hot UAs," protection order violations, or new offenses, may justify increased push back, depending on your options.
It goes without saying that probation should not be taken lightly, and neither should revocation proceedings. Consult an experienced lawyer first.