Here is I think the root of your misunderstanding:
"I guess I'm confused as to why there would even be profit and loss in a futures market. The way it was explained, I thought the whole point of a futures contract was to guarantee against the effects of volatility. "
No, that is how some people use futures contracts, but it is not what they naturally are. A futures contract is an agreement to buy or sell something at a known price, on a future date.
Take yourself out of the financial mindset for a moment and apply this to your personal life. Assume you sign a contract to buy a new car for $30,000, but the dealer has to wait 6 months for the car to be shipped to you, which you agree to in the contract. This is the 'futures contract' [note that many futures contracts actually contain terms for physical delivery - meaning they are not just financial concepts, they truly are orders to buy or sell x amount of pork bellies and drop them off at your doorstep].
In this simplest form, the price you will pay is exactly fixed - you will not pay more or less based on the price of steel, or transportation costs, or anything else, you know exactly how much you will pay. However keep in mind that even in this simplest format, someone has risk here, just not you - perhaps the dealer has to pay whatever transportation costs end up being [oops, rail strike means the car is taken by semi-trailer, increasing fuel costs by $500], or perhaps the manufacturer has to pay whatever the paint costs end up being [hooray, new method of creating yellow paint have dropped by $200!].
Now in that same example, imagine you sign the contract, and then fail your drivers' license, meaning that you will not be able to drive your car when you get it. So, when it arrives, you will have to sell it to someone. If the value of your model of car rises, then you might make a profit! If the value of your car drops, you might have a loss. This is because you have a fixed cost to purchase the car, but your sale price is yet-unknown. This is how many people use futures contracts - as a way to financially peg their sale or purchase price to a known thing in advance.
This could be done as a way to gamble on the future price of that thing, or the opposite - for example, if you are a manufacturer of bananas and know you will make about 10,000 kg's next month, you could lock in your sale price today by selling a futures contract guaranteeing their delivery at a known price. Whether you are doing it to speculate on future price, or hedge against your other assets & liabilities, the inherent 'value' of your futures contract would have an implicit gain or loss based on the value of that item in the open market that day.
To go back to your example, if a banana producer agrees to sell 100kg of bananas for $5/kg 3 months from today, then if the price of bananas rises 2 months from now, the producer has inherently lost value by fixing their price - because if they had simply waited 3 months to sell them, they would have gotten more money. This is the cost of mitigating risk - the producer has eliminated both their upside [because they gain nothing if the price of bananas rises], and their downside [because they lose nothing if the price of bananas falls]. If this is done purely to reduce risk, then any gain on the futures contract itself, should offset a loss on the underlying asset [or vice versa], but it is still true to say that in that case, the futures contract has a gain or a loss.