I know my horse may buck when he is either wanting to avoid something or the rider is clinging onto him with their legs. I found that to get rid of that habit of bucking I would get into two point and get him moving as forward as possible to get him thinking about something else.
i would keep the horse moving, at least walking. and have a crop in hand and someone else there that may want to be far ish behinde the horse to clap and encourage more. something that really helped my horse was to talk to him and always keeps his mind on me rather than littarly anything else.
Walk in circles and try to distract them so they don't think about being at a show.
I think it depends on the bucking, if he does this at home also it might mean that the saddle is not fitted correctly, or that there is something else not sitting right with the tack. It might also be that the horse is just happy and excited to be competing. My stallion always bucks, before the class, during the class, after the class, during the prize giving ceremony, but he also does it at home, and has done it for as long as i know him, and its just because he is happy to be working, and showing off. I dont think that you can train him not to do it if this is the case. Just sort of sit it out, maybe try and be talking to him a little bit, like soothing him, and playing lightly with the bit so his attention is on you, and not the crowd, or the arena... hope this helps :)