To me, "teaching assistant" strongly suggests working under some other specific person who has more primary teaching duties and/or more control of the course content, procedures and grading, while "instructor" suggests (though less strongly) the person who does have those primary responsibilities. When my colleagues and I want to hit that last point more strongly, we often say "instructor of record". This means that when you look up the course in various academic records, someone is listed as "the instructor", and that person [or persons, sometimes] is the one who has the power to admit, forbid or withdraw students from the course, assign grades and so forth.
But in truth the terms are not used so unambiguously, even within one university. In my department (mathematics, UGA) we have an "outstanding TA award". This award is given for students for teaching responsibilities which are identical to my own as a tenure-track faculty member -- i.e., they write a syllabus, give all the lectures, choose all the homework, write and grade all the exams and assign the grades. (The only difference between what happens when I teach these courses and when a graduate student does it is that the graduate student gets more oversight than I do, in various ways: e.g. they should in principle be showing all of their exams to a faculty mentor beforehand.) I would be happier if this were called an "outstanding instructor award". In fact the issue of how much power and autonomy graduate student instructors should have is an active one in my department, and a minority of faculty members call graduate students "TAs" rather than instructors and use this as an argument for less autonomy in their teaching. So it's complicated!
Let me end by saying that many universities feel pressured to call graduate students "TAs": the extent to which graduate students serve as "instructors of record" varies a lot from one department to another. Moreover, in some cases it seems like it would be inappropriate to have all but the most senior grad students as instructors of record whereas in other cases it could even improve the teaching experience. (I regularly teach the same second semester calculus class that I taught as a graduate student. My understanding of freshman calculus is deeper now than it was as a PhD student. This is accompanied by less empathy for the students than I had when I was only a few years away from having learned this material myself, with the effect that I think it is likely that a majority of students would have been happier to have the graduate-student-me as an instructor than the present-day-me.)
I fear that at least in some cases universities call their graduate student instructors "TAs" so as to be able to report a larger percentage of courses taught by tenure-track faculty. Of course this is pure skullduggery, of which the graduate students are not the intended victims but rather collateral damage.