When the application/system is performing an action, show the user what is happening. As a general rule add some type of loading indicator. Also a progress bar may be added if needed.
Current sample loading indicatorWhen the user completes a task successfully, he/she should be notified. This is generally done by means of a successful message. Such an example can be seen below.
It is important to inform the user when an error occurs. This is generally done by displaying an error message. Apart from just showing the error, also explain what can be done to remediate such an error. Such an example can be seen below.