Causing one event only

so what code should i have for "looking too see if the pin goes high" im relatively new to this.