I want to know how to achieve perfect butt for men. Please explain it?
It depends on the kind of butt you want. Bret Contreras, aka "The Glute Guy" is well known as the world's glute training expert (he literally wrote his PhD thesis on glute exercise activation) and I have summarized his findings below. He has great advice on his website and I encourage you to dive in more deeply there.
Your butt is flat/small and you want it more muscular overall:
Great place to start is with barbell hip thrusts.
The top part of your butt is lacking (upper glutes):
Hip thrusts, back extensions with a rounded upper back, quadruped hip extensions, quadruped donkey kicks, band or cable standing abduction, band hip thrusts, and lateral band walks.
The lower part of your butt is lacking (lower glutes):
Hip thrusts, pendulum quadruped hip extensions, back extensions, single leg hip thrusts, deadlifts, squats, lunges, Bulgarian split squats, reverse hypers, band hip thrusts, and band or cable hip rotations.
You want a smaller butt...
...because it is too fat:
Diet makes the difference. The training stays the same.
...because it is too muscular:
Unless you are currently at an ideal body fat percentage and can indeed say that, yes, your butt is overly muscular, then keep up the training along with changing your diet. It is hard to tell if you are too muscular if you have a lot of fat to lose, and you may like your muscular a** once you lose the fat. If you are at your desired leanness then you can lessen your glute exercises and focus elsewhere.
Hope this helps!