Please take some of the tutorials, as this is so basic:
3 Hour Introduction
6 Hour Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Getting Started with NI Products
You might also want to read up on using a State Machine and Event Structure.