In Microsoft CRM status of a record is set using the combination of state code and status code values. Each StateCode has its own default StatusCode value. While setting the record status both these values should be provided in the right combination for the record to have the right status.
For example, if an incident StateCode is 0 (Active), the default StatusCode is 1 (In Progress). If the incident StateCode is 1 (Resolved), the default StatusCode is 5 (Problem Solved). Microsoft CRM only accepts StatusCodes that are valid for a particular StateCode.
The CDF database stores only the integers that are depicted in below pictures. Picture should be read as follows,
{State Code Value – State Code Text} – {Status Code Value – Status Code Text}
Please refer here for Microsoft documentation. There are more posts on this among which I found this as a wonderful article.