How much are your Magic cards worth? The easy answer is that they're worth what someone's willing to pay for them! But what exactly makes someone willing to pay $40 for a particular card? There are a number of factors that can contribute to the value and demand of a Magic The Gathering card.
Those who play Magic The Gathering at a tournament level contribute to demand for Magic singles, especially powerful rares & mythic rares. If a card is out of print, powerful, or a staple of several decks, that can increase its relative price. As new decks emerge on the tournament scene, demand for power cards will rise and fall depending on how many decks are using these cards. Websites like TCG Player track trends in Magic card values over time.
While most of a card's value is derived from its utility in a tournament deck, out of print cards from the very first few sets of Magic often demand a high premium due to their rarity. Relative to newer sets, the print runs of Alpha, Beta, Unlimited, and even Revised Edition were a lot smaller, and contained many powerful cards. As with any trading card series, the harder is it to find, the more it's going to be worth.
Sell Price vs. Buy Price
The price that a store sells a card for is usually going to be much higher than its "buy price". If you sell your cards to a store, you will generally get a fraction of what is worth. If you opt to receive store credit, some stores will increase the amount of credit given. If you sell your Magic cards yourself, you will receive an amount closer to a store's sell price. The more time you're willing to put into selling your Magic cards, the more value you'll receive when you are ready to sell them.