Well, in short, achievements are unlocked when a certain condition is met. So you need to be able to produce if statements to check the condition you want.
For example, if you want to know that a level was completed or a boss was defeated, you'd need to have boolean flag turn true when these events happen.
Then:
if(GlobalFlags.MasterBossDefeated == true && AchievementClass.MasterBossDefeatedAchievement == false)
{
AchievementClass.MasterBossDefeatedAchievement = true;
showModalPopUp("You defeated the Master Boss! 30 gamerscore");
}
You can make this as complex or simplistic as needed to match the condition that you're wanting.