Think of the CF statement as actual flows (changes in cash) that link the beginning balance of cash to the ending balance. Under the direct method, for accounts payable, if the payable amount increased from one period to the next, that means that the company did not pay out as much cash to suppliers as it was able to defer. So you would subtract the increase in accounts payable from COGS (because they didn’t pay out that amount from the cash they earned) under the direct method of figuring CFO.
For the indirect method, start with net income. An increase in payables would be added back to net income (I think of the indirect method as starting from the bottom of the IS statement, so it’s the opposite of the direct method).
CFI and CFF are on the cash flow statement. They are usually (always?) listed after CFO. In the readings, there is not as much focus on CFI and CFF becasue there is only one way of reporting them, as opposed to the direct/indirect methods for CFO. Does this answer your question?