As long as you use the prepared instructions correctly, they will. You need to make sure that you bind all external variables and do not put them directly in the query.
for instance
$stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=" . $name);
, , . - SQL-.
, ...
$stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) {
$stmt->bind_param("s", $city);