I don't know what the right terminology is so I am using some programming jargon, sorry.
But for example can we say that a function accepts reals and returns naturals? Or accepts complex and returns reals? More generally accepting one type and returning another?
For example $f(x) = \sqrt{x}$ defined as having domain natural numbers and codomain natural numbers. Then I can feed it $\sqrt{16} = 4$ with no issue but then $\sqrt{5}$ is not a natural number.
Am I not allowed to mix and match input/return types? What are these properties even called?
A function can take any "input type" and give any "output type". The "input type" is called the domain of the function, and the "output type" is called the codomain. The domain and codomain are allowed to be any sets at all, and do not have to be the same set.
To be more precise, given any two sets $A$ and $B$, a function $f:A\to B$ is a rule which, given any element $a\in A$, produces an output $f(a)$ which is an element of $B$. Here $A$ is the domain and $B$ is the codomain. (To be even more precise, such a "rule" is really a subset $S$ of $A\times B$, where for each $a\in A$ there is a unique $b\in B$ such that $(a,b)\in S$, in which case $b$ is what we call $f(a)$.)
As for your example, there is no function $f(x)=\sqrt{x}$ with domain and codomain the natural numbers. For each element of the domain, the function is required to give an output which is in the codomain. Since $\sqrt{5}$ is not a natural number, the rule $f(x)=\sqrt{x}$ does not define a function with domain the natural numbers and codomain the natural numbers.