The term "unsettled funds" is a legal term, defined by legislation and judicial decisions and enforced/monitored by the SEC. The intuition is the idea that while a financial transaction on a security may be processed at one point in time, the "settlement" of the cash takes time and could end up reversed or delayed (such as for rule violations, investigation, etc.). As such, if you trade with that money then the legal argument is that you were actually making trades with purchases you didn't really have the cash for with 100% certainty, and thus you were effectively engaging in a risky activity using extended credit. In a cash account, as distinct from a margin account, this can be a rule violation according to the SEC, because the whole definition of a cash account is you can only buy things you have the cash for with no credit involvement and no risk of making a trade you don't have the money to fully cover.
Depending on the nature of the security you sold, the legal amount of time it takes to settle is generally 1-3 days, but you should look for your trading platform's "Unsettled Funds Rule" policy to see. As an example, Ally gives this explanation for stocks and options, and Trading Direct gives a "Cash Account Trading: Unsettled Funds Rule Summary" here. Fidelity gives more detail on ETF settlement periods, including the different classes ETF-like securities, here (2 days settlement for ETF, less for other security types.
99%+ of the time, unsettled funds are your money, and having funds as unsettled does not mean that the transaction of selling/buying did not occur and is not closed - it just means the funds have not been allowed time to "settle". Think if it like the time it takes a check to clear, basically.
Buying/selling with unsettled funds in a cash account can be an SEC rule violation (the particulars being apparently somewhat complicated), so you just have to wait the 1-3 days for the funds to become defined as settled before you can make additional transactions.