Note of warning: this is coming partially out of reading a few too many discussion posts/fic requests that paint Ziva as this queen high bitch of the universe. Parts of it are semi-coherent arguments against the assumptions the people bashing her have, and parts of this are my own attempts to understand a fairly complex female character on a show that does a decent job writing strong female characters.
One of the most important things for me, when it comes to understanding Ziva as a character, is understanding how much she's been shaped by her early relationships with those she's loved.
That seems like a bit of a no-duh for understanding almost any character/person when we know their background, so let me expand a bit. To the best of my knowledge, having admittedly missed several episodes from seasons 4-6, Ziva has mentioned or had other people mention for her, four people whom she has loved. Her father, Ari, her sister Tali, and a Muslim boy she mentions was her best friend as a child. Not much, if at all, is mentioned about her mother or any other family member.
So, of those four major loved ones, what's happened with them? Two, her father and her half-brother, have betrayed and used her for their own purposes. And the other two were taken from her in semi-random attacks. The major themes of her relationships prior to NCIS, therefore, are betrayal and loss. Her assumptions about the world, and thereby her defense mechanisms, focus on the concept that the people she cares about will either betray her or die in a way that she can't prevent or control.
Now add in the fact that she seems to have been trained with the idea that the mission is of utmost importance, above personal safety, morality, or potential cost, and with the concept that she cannot rely upon anyone else, that she must be completely self-sufficient.
When you put those two facts together, and add in Ziva's underlying personality, what you get is many things, among which is a very fascinating character, massive issues, and really good tv drama moments. What you don't get is someone who has a clue what to do in a team dynamic. It is literally completely out of her scope of reference to trust that the person beside her has her back now, and will have her back two weeks from now and beyond.
What you get is someone who has learned not to trust easily, who has learned that the people she counts on will leave her or betray her.
Ziva spends the majority of the third season of NCIS expecting the others on the team to not back her up, and expecting the others to fail her. In "Frame Up" and "Probie", she's the one most likely to assume that Tony and McGee messed up. "Under Covers" startles her when Tony makes sure she can get out ahead of his own safety, as she's well aware that Ari wouldn't have done the same for her. "Jeopardy" shows her going on her instincts here as well. As soon as she is called into question, she assumes that no one will believe her or back her up, and that she will get the blame regardless of what happened. Gibbs standing by her, Ducky and McGee trying to reassure her, these are new things to her.
In the third season, we also get one of the episodes she's most often criticized for, "Boxed In." (If it's been a while since you've watched this ep, or you haven't been reading the Ziva bashing metas and stories lately, it's the episode where Ziva and Tony were locked in a cargo shipping container with several million dollars in counterfeit bills, and the B plot is that Tony wasn't invited to a dinner party Ziva held for the rest of the team.) Basically, the criticism of her centers around the fact that she deliberately excluded Tony from a team event, and the episode portrays it as being something Tony is rather upset about, given his insecurities about his place on the team.) Now, if you haven't watched the episode recently, or you've read the metas/post eps since, you'd assume that she'd stabbed Tony and then jumped up and down on his wound repeatedly, by the vehemence of the vitriol aimed at her.
Point one: yeah, she was definitely in the wrong to have excluded him from a team event. She is well enough aware of her teammates characters to understand how being left out would hit him at a weak point. She knew very well she was hitting one of his triggers when she discussed it with him in the shipping container.
Point two, which most people skip over in their attacks: before they get out of the shipping container, she's apologized for her actions already. And she makes restitution by offering to cook a private dinner for him.
Watching the episode, part of it seemed like the situation snowballed. That she invited McGee and Palmer initially to thank them for helping her get settled. Abby would have been invited as an olive branch, given the friction and hostility Abby has shown towards Ziva earlier. Inviting Abby to dinner gets her on Ziva's turf, in a less tense environment, to give them a chance to get along together. And inviting Gibbs is just basic office politics. If you're inviting the team, it's basic people skills to also invite the boss along, given their work environment.
Not inviting Tony seems like it was in part, an effort on her part to control the situation and direct her effort at building relationships towards the ones she had easily in hand (McGee, Palmer, Gibbs to a certain extent) and the one she in particular wanted to work on (Abby). Tony tends to challenge her, and he makes himself the center of attention in any group, which wasn't what she was going for.
For the other part of it, there is the fact that her relationship with Tony tended to be very competitive in the third season. They enjoyed verbal sparring and scoring points off of each other. She might have been attempting to score more points in their running game, and went a bit too far. (I will note, the same thing tended to happen with Kate and Tony in earlier seasons, and still does happen occasionally with McGee and Tony. Tony tends to play these escalating games with all his teammates, but he tends to be the one to pull back right before he hits too hard, while the others will sometimes hit him pretty hard at one of his weak points. Normally? That weak point is his own insecurity about his place in the team hierarchy/professional skills.)
So, all in all, what you get in this episode is a misstep in their banter that hits too close to home for Tony, Ziva starting to twit him on it, then eventually apologizing for going too far, and making amends for her actions. She's not exactly an ax murderer here.
She's more secure, more confident in her teammates by season four, but in the first episode, when she's in trouble she doesn't rely on Tony or the rest of the team. Instead, she goes to Gibbs. Someone she holds a secret for, someone who owes her a favor. Under stress, personal stress, she reverts to her first instincts, trusts only those who have a quantifiable reason to help her. I think this is also the season that starts the pattern of anyone on a case that Ziva is interested in either dying or turning out to be the killer. Part of it is fairly standard for a crime drama, after all, there have been multiple occasions where Gibbs, Tony, or Ducky have been interested in a woman who ends up being the murderer. But the other part of it is a repetition of Ziva's life-long pattern of watching people that she cares about die or betray her trust.
And that leads into the other major criticism of Ziva that I've seen: her response to Tony's undercover fiasco. McGee blows it off as Tony being irresponsible, Gibbs is somewhat suspicious but stays out of it, but Ziva gets worried and immediately leaps to the conclusion that Tony is sick and dying. Beyond that, when Tony's car does go up in flames, Ziva is the first to assume that he has actually died, and maintains that assumption until given proof against it by Ducky.
By this point, it seems like she no longer believes that her teammates will betray her, but she does believe they will die on her.
The critique I've seen of her for this tends to focus on her being too clingy, too curious about what's going on in Tony's life, and too worked up over Tony. Which, erm, has my brain breaking a bit when I compare this critique of her to the criticism laid against her over "Boxed In." Really, at this point in the critiques, often coming from the same person in both cases, Ziva cannot win. It makes perfect sense for her character to assume the worst about Tony's health, and it fits in with her need to control things that she'd be nosy, that she'd want to know everything, even the worst prognosis, rather than be shocked by his death. Again, Ziva's major issues revolve around loss and betrayal. When she thinks she's going to lose someone she cares about, she goes into overdrive as a defensive mechanism.
That was nowhere near as coherent as I wanted it to be, but it is at least an attempt to formulate a defense of Ziva and an understanding of who she is as herself, rather than as the person setting off Tony's insecurities or whatever else she's being yelled at for this week.