Definition 
A secured transaction is a loan or a credit transaction in which the lender acquires a security interest in collateral owned by the borrower and is entitled to foreclose on or repossess the collateral in the event of the borrower's default. The terms of the relationship are governed by a contract, or security agreement.  In the United States, secured transactions in personal property (that is, anything other than real property) are governed by Article 9 of the Uniform Commercial Code (U.C.C.).

Security Interest Protection in Bankruptcy Proceedings 
One of the main benefits of becoming a secured creditor through a secured transaction is protection during a bankruptcy proceeding. In the event of a bankruptcy proceeding, a secured creditor needs to file a proof of claim describing the debt and the remaining balance owed.  In the United States the Bankruptcy Code §506(b) entitles a secured creditor with a court approved claim to accrue post-filing interest, attorney's fees, and costs on its claim when three conditions are met:

 the attorney fees and costs are "reasonable"
 payment of the attorneys fees and costs by borrower (or debtor) must be provided in the lien or by statute which the claim arose, and
 interest, attorneys fees, and costs can be accrued to the extent that the value of the collateral exceeds the amount secured by it.

Claims can be undersecured, where the value of the collateral is worth less than the amount due for the lien. Such as someone uses their car valued at $30,000, while the lien is for $40,000, meaning $10,000 of the debt is unsecured. Claims also can be oversecured, where the value of the collateral is worth more than the amount due for the lien. Example, someone uses their boat valued at $50,000 for a lien valued at $45,000, making $5,000 oversecured.

One feature that applies in bankruptcy proceedings that impacts creditors is the automatic stay. If the security interest is not adequately protected, a secured creditor may ask the court to lift the automatic stay. In the United States an automatic stay must be lifted by the courts if:

 there is no equity in the collateral that might be realized for unsecured creditors, and
 the collateral is not necessary for an effective reorganization.

How to become a secured creditor 
A security interest can be created by contracts, liens created by statutes, and liens created by judicial acts. UCC §9-203(b) requires three things to create a security interest in the United States:

 possession of the collateral or an authenticated security agreement with a description of the collateral,
 value of the collateral, and
 the borrower (debtor) must have rights in the collateral.

Types of Collateral 
A secured transaction includes several forms of collateral. The definition of collateral in the U.C.C. is: 

This definition includes things such as home loans, car loans, inventory loans, farm crop loans, and many more. Depending on the type of collateral special rules may apply to the secured transaction. Article 9 of the U.C.C. defines many types of collateral, which are not always the same as the common meaning. An example of this would be the definition of "farm products", which includes not only the eggs a chicken lays, but the chicken too. In the United States, when a U.C.C. collateral term is used in the security agreement, usually the courts will apply the Article 9 term meaning rather than the common one.

Various types of property can serve as collateral for a security interest, such as a when a person takes a mortgage out to purchase a house the house becomes collateral. Another example of collateral for a security interest would be the car if someone takes out a car lien to help cover the costs. 

The law treats differently those creditors who are secured (i.e. have an authenticated, perfected security interest) from those creditors who are unsecured. An unsecured creditor is simply a person who is owed money and has not received payment according to the terms of the agreed upon transaction. Upon default of a debtor who has multiple creditors, the distinction between being a secured creditor and an unsecured creditor is legally significant. The secured creditor will generally always have priority to getting his money before the unsecured creditors do. In other words, the unsecured creditor is at the back of the line of priority – his only remedy is to obtain a judgment from the court for the amount of the defaulted loan.

The following example is given:

A debtor borrows $10,000 from a car dealership to purchase an automobile, using the automobile itself as collateral for the loan (in other words the dealership retains a right to repossess the automobile in the event the debtor defaults on the loan). The dealership makes this loan using an authenticated security agreement – a signed agreement giving the dealership the secured right to repossess the car in the event of default of the debtor. The debtor also has two unsecured creditors who have made loans of $1000 each to the debtor. Neither of these creditors has a security agreement – their only method of recovering their money in the event that the debtor defaults on the loan is through the judicial system, whereas the secured creditor can simply repossess the car at his option (This is called self-help repossession and is completely legal provided the secured creditor does not breach the peace in doing so). The debtor is in debt $10K to the secured creditor and $2000 to the unsecured creditors. Assume the debtor defaults and his only asset is the automobile. The dealership can repossess the auto and sell it to satisfy its debt.  Two things can happen here: 1) The dealership sells the collateral (car) for more than the amount of the debt (let's say $15K). In this case, the debtor would receive the excess $5K (surplus) which he would use to satisfy the debts of his unsecured creditors (and then would have $3K left over). 2) The dealership repossess the car and sells it for less than the amount of the debt, let's say $9K (more likely scenario). In this case, the secured creditor dealership keeps the $9K, and the remaining $1K (deficiency) that the dealership is owed becomes unsecured – it is on the same level of priority as the other two unsecured loans. Those three unsecured claims of $1K each will be paid off equally. Thus, if the debtor has $1500 to satisfy its debts – each unsecured creditor would get $500 (1/3 of amount each). The remaining debt will probably never be repaid because, in cases such as these with the debtor having multiple loans on default, the debtor has most likely filed for Ch. 7 Bankruptcy.

It is crucial, if you are a lender, to have a security agreement in collateral that you are confident is worth at least as much as the amount of the loan you made to the debtor. If not, your deficiency in that amount is unsecured. In the previous example – the dealership loaned $10K on a car that had a fair market value of only $9K. Thus, they were deficient $1K which becomes unsecured. To perfect a security agreement, the filing of a public notice is usually required. See §§ 9-302 – 9-305 of the code.

See also 
 Secured transactions in the United States
 Security interest
 Chattel mortgage

References

Contract law