Male firstborns must fast on Erev Pesach. The reason for this fast is because the Jewish firstborns were spared on Pesach night from the plague of the firstborn. Therefore, Jewish firstborns acknowledge that they were not worthy of being saved and therefore fast as a sign of repentance on Erev Pesach.
There is another reason, suggested by Rabbi Yakov Kamenetzky Zt”l. On Erev Pesach, the entire Jewish People converged onto the Temple Mount to bring the Korban Pesach. Every family had to participate in this sacrifice and therefore to accommodate the masses of people, every single Kohen was put to work on Erev Pesach. Our tradition has it that the firstborns were supposed to be the priests but they lost their chance after participating in the Golden Calf. That being the case, the day most reminds the firstborns of their lost opportunity is Erev Pesach. Watching the Kohanim hard at work, running the ceremonies at the Temple was a sad reminder to the firstborns of what they could have been doing. It is for this reason, explains Rabbi Kamenetsky, that the firstborns fast on this day; to ask for forgiveness for their participation of the Golden Calf.
All male firstborns must fast; whether it is the mother’s firstborn, the father’s firstborn, whether it was a cesarean birth, whether the mother first had a miscarriage, and even if one is a convert firstborn.
The custom is that a firstborn may attend a Siyum, participate in the Siyum by eating some food served to celebrate, and once the fast is broken they may continue to eat the entire day. (This idea of ‘once the fast is broken it is permitted to eat the entire day’ does not apply to other fast days.)
If a firstborn was not able to attend a Siyum and knows that by fasting they will have a very difficult time participating properly in the Seder, they may break their fast but should not eat more than they have to.
According to some authorities if one is unable to attend a siyum they could participate by listening to the siyum on the phone.