Key difference between MID() and TRIM()

What is the key distinction between the Trim() and Mid() formula functions in Stackby, and how do they differ in their usage for text manipulation within tables?

Mid() extracts a substring of a specified length from a given position, while Trim() removes leading and trailing whitespace.