What is the value of something? What is the worth of something?

I was thinking that it is either how much someone is willing to pay, or is it how much someone is willing to sell it for? Or is it the point where those two meet?

What if it doesn't meet? Say I had an object and would give it up for \$100, but if no one wants to buy it for that much, only say \$90, then what is it worth? Because I won't be selling it and no one will be buying it.
There is a lot to be said about this subject, and I will only give a partial insight.


First off, value is subjective. Everyone will place different values on different things, depending on such things as personal preferences, their economic status and income, and thoughts about the future such as expected future income and wealth, and the future worth of the item. Your reservation price is the highest price you would theoretically be ready to buy or sell something for. This may or may not correspond to the actual price you would be getting on the market. If the price of the product is lower than your reservation price ($ P &gt; P_{r}$), then the difference is your surplus value, which is what you gain beyond what you think the actual value is. For example, on the market for goods, let's say that the price of a good is $ \$ 100 $. Your reservation price is $ \$ 110 $, so that means that you think the product is worth $ \$ 10 $ beyond what you pay. The total value to you, is $ \$ 110 $. On the other hand, the seller's reservation price is $ \$ 90 $ – i.e. the seller would be ready to let go of the product for that amount. On a very efficient market, that price might be what it cost to make the product. So $ \$ 90 $ is the value of the product for the seller. $ \$ 100 - \$90 = \$ 10 $ is the surplus value for the seller, if it sells for that price.
If your reservation price is $ \$ 100 $ to sell something, but the best offer you can find is $ \$ 90 $, then you should distinguish between the personal value that you attach to the product, and the market value. In the public world, we usually value things by its market value. So if $ \$ 90 $ is the best offer you can find, then that is its fair value. 
This assumption means that a building that cost $ \$ 1\ million $ to build, can actually be worthless ($ \$ 0 $) on the market if nobody wants to buy it. This could of course change in the future, perhaps people will get around to see the value you see, with time. So how is it that a building can be considered completely worthless, even though it's "obviously not"? Well, it can also be said, from a more financial perspective, that a value of an asset is worth the future income that it will provide. So if the market doesn't believe that the asset can create future income, then it's basically of no use. In market crashes, fear may drive investors to undervalue assets, or simply not be willing to engage in transactions at the time, driving prices down.
We can create a measure of something's value by calculating its present value. Typically, the formula would look something like:

$ PV = \frac{FV}{(1+i)^{n}}$

where $ FV $ is the future value (what you can sell it for in the future), $ i $ is the best alternative rent you would be able to get per period during that time (e.g. by investing in a risk-free bond), and $ n $ is the time periods until payment. The formula discounts the future value to give a comparable present value, that you can use to compare it with other investments. $ (1+i)^{n} $ is the compounding effect of the rent over time.

So let's say that you own a nice painting, and you think that it will be worth $ \$ 500$ in 10 years. Given that you could sell the painting today, and place the money in a bank account which pays $ i = 1 \%$ per year in interest rate, you should be willing to sell it for $ \frac{\$ 500}{(1+0.1)^{10}} = \$ 193 $ today, meaning that you either can get $ \$ 500 $ by selling the painting in 10 years, or the same money in 10 years by selling it now and keeping the funds in a bank account until then. Again, market value is what should be used here to value the asset in transactional terms. But for you personally, the painting may be worth more than $ \$ 193 $ because it brings pleasure looking at it every day. In that case, you might actually value it in such a way that you would rather keep the painting for 10 years, rather than sell it now.