With the amount of information you've provided it's impossible to offer a solution. We can't see your computer so we need to know the details of your problem and setup, i.e.:
- what system are you running?
- what version of iPhoto are you running?
- what fixes have you tried?
- where is your library located?
- did you apply any updates or upgrades just prior to the problem occurring?
- are you running a "managed" or "referenced" library?
- what type of Mac?
- how much free space on your boot drive?
Assuming you're running iPhoto 9 or later try the following:
1 - launch iPhoto with the Command+Option keys held down to open the First Aid window. Be sure to follow the circled recommendation in the screenshot.
2 - apply Option #4, Rebuild Database.