A workflow in Salesforce is basically a container or business logic engine that automates certain actions based on particular criteria. If the criteria are met, the actions get executed. When they do not, the record will get saved but no action will be executed.
There are two types of actions in a workflow in Salesforce:
Immediate Actions: Actions that get executed immediately when the record is created or edited
Time-dependent Actions: Actions that get executed after a certain duration of time, such as 10 days before a records’ close date. After a certain time period, the workflow rules in Salesforce will re-evaluate the record just to make sure that the rule criteria are met. If the record meets the criteria, the aligned actions will be executed.