To understand what a will is, you must first understand what Probate is. Probate is a court process where the court names an executor to gather property of the decedent, pay any creditors of the decedent out of that property, and ultimately distributes the property to the decedent's heirs.
Example: Mom dies, leaving two sons, Andrew and Bart. Bart petitions the court to become the executor, and the court complies and names him executor. Bart collects money from mom's bank accounts, and sells her house and adds the sale proceeds to the estate. After all of Mom's creditors are paid, Bart distributes the proceeds to himself and Bart.
Basically all that a will does is name an executor and tell the executor how to distribute property.
Example: Mom has two sons, Andrew and Bart. She knows that Andrew is far more responsible than Bart, and so she wants him to be the executor. She also wants 1/2 of her estate to go to the Salvation Army, and the other half to go in equal shares to her sons. Mom goes to an attorney to draft a will, naming Andrew as the executor and giving 1/2 of her estate to the Salvation Army, and the other half to be divided evenly between Bart an Andrew. When mom dies, Andrew files mom's will along with the petition, naming himself as the executor. The court appoints Andrew as the executor, and when it is time to distribute the assets, he gives the Salvation Army 1/2, and himself 1/4 and his brother 1/4. Notice how just because Mom had a will, her assets still had to go through probate.
The above example of probate is a simplified example of probate. In reality, probate takes time (a minimum of 6 months), and quite a bit of money in attorney fees and court fees, and other expenses. Some people know that probate can be quite burdensome on their heris, and so they seek to avoid probate. Many times, they will use a revocable living trust (RLT). A RLT is an arrangement where a person (called "grantor", "settlor", "trustor", etc.) gives the legal title to property to a trustee, for the benefit of someone (called "beneficiary"). Generally, the grantor will also be the trustee and beneficiary.
Example: Mom settles a RLT with herself as the initial trustee and beneficiary, but her son Andrew as the successor trustee, and her two sons (Andrew and Bart) as the successor beneficiaries. She conveys her house to the trust. When mom dies, her trust property automatically transfers to the ownership of Andrew, as trustee. Andrew the trustee sells the house, takes care of basic trust administration duties, and distributes the sale proceeds to himself (as beneficiary) and his brother, Bart. There was no need for probate because there was always an owner (the trust property transferred automatically to Andrew, the successor beneficiary). Mom's property never transferred to her estate (and thus requiring probate).
There are other ways to avoid probate, but a revocable living trust is among the most popular.