An option to buy gives the borrowing club a choice at the end of a loan; an obligation to buy removes that choice once agreed conditions are met. Both fix the fee in advance. The difference is who carries the risk if the loan spell goes badly.
Under an option, the risk sits with the selling club. It has agreed a price and then has to wait to find out whether anyone will pay it. Under an obligation, the risk moves to the buying club, which is committed to the signing whether the player has been excellent or barely played.
Because of that, the two are priced differently. A club that wants an obligation rather than an option is usually asked for more money, or for the conditions to be set low enough that they are close to certain to trigger. An obligation that only fires on winning a league title is an option wearing a different hat.
There is a third shape between the two, sometimes called a conditional obligation. The deal starts as an option and converts into an obligation automatically once something specific happens, most often a number of appearances or promotion, which is why the appearance threshold is negotiated as hard as the fee.