Mac OS X Lion has a feature that lets users to resume their work from where they left before a shutdown. If you have kept applications and windows open before a shutdown then you will be provided with an option to keep these windows open when you restart the system.
When you click on the Apple menu and select restart or shutdown from the menu list, the following “Are you sure you want to shut down your computer now” window will appear.
Make sure to mark the check box with label as Reopen windows when logging back in. This would reopen the windows automatically when the start using your Mac again.