Parameters are used to protect you from malicious user input.
But if the parameter expects a string, is it possible to write input that will be interpreted as sql, s
Parameterized queries generally quote the parameter if it is a string behind the scene so that the normal SQL operators are not interpreted as such. This means that even if a user enters potentially malicious data it is simply treated as a string input and not interpreted as SQL operators/commands.
There may be technical differences in how it is implemented in the various frameworks, but the basic idea (and result) is the same.