In the last and seventh Harry Potter book, (Harry Potter and the Deathly Hallows), Hermione, in the Burrow, says she has used a Memory Charm on her parents. But, after being attacked by two Death Eaters in a café, when she's asked to perform a Memory Charm on them, she says she knows the theory, but she's never done one before. What's going on?
They were two different spells.
The author answered this specific question in an interview she did shortly after the release of the Deathly Hallows book:
Laura Trego: Did hermione really put a memory charm on her parents she says she did but then about 50 pages later tells ron shes never done a memory charm
J.K. Rowling: They are two different charms. She has not wiped her parents’ memories (as she later does to Dolohov and Rowle); she has bewitched them to make them believe that they are different people.
As usual with any author, and particularly with this one, the question then arises of whether this was really what she had in mind when writing the passages in question, and whether her claimed explanation makes sense or can be deduced from the text itself, rather than being made up to cover for her mistake. In this case, I think Rowling's explanation can be figured out without needing to take her word for it. We know the following pieces of information about Memory Charms from the books:
The Obliviate charm has a permanent effect. It's the one that Lockhart used successfully throughout his career to wipe the memories of the people who really did the heroic deeds he claimed as his own, and the one that backfired on himself to wipe all of his memories:
He raised Ron's Spellotaped wand high over his head and yelled, “Obliviate!”
-- Gilderoy Lockhart, Harry Potter and the Chamber of Secrets (book 2)
We see him later in book 5, a permanent resident of St. Mungo's hospital. Even the best healers in the wizarding world can't seem to reverse the effect of his backfiring Obliviate charm.
The spell Hermione cast on her parents can be reversed, because she plans to do so when (if) Harry defeats Voldemort and the world is safe again:
“Assuming I survive our hunt for Horcruxes, I’ll find Mum and Dad and lift the enchantment. If I don’t — well, I think I’ve cast a good enough charm to keep them safe and happy. Wendell and Monica Wilkins don’t know that they’ve got a daughter, you see.”
-- Hermione Granger, Harry Potter and the Deathly Hallows (book 7)
Therefore, that spell can't be Obliviate. She also says that she "modified [her] parents’ memories", not wiped them. Her parents still have all their mental faculties, unlike Lockhart; she hasn't wiped their memories of the last 17 years, only somehow modified them so that they forgot (temporarily) the Hermione parts of their lives.
(In the film version, Hermione is seen casting Obliviate on her parents. But this is irrelevant both to your question on the Literature site and to Rowling's claim in 2007, so let's ignore it.)
The spell Hermione casts on the Death Eaters in London is the Obliviate charm, and Harry refers to it as wiping rather than modifying their memories:
“We just need to wipe their memories,” said Harry. “It’s better like that, it’ll throw them off the scent. If we killed them it’d be obvious we were here.”
“You’re the boss,” said Ron, sounding profoundly relieved. “But I’ve never done a Memory Charm.”
“Nor have I,” said Hermione, “but I know the theory.” She took a deep, calming breath, then pointed her wand at Dolohov’s forehead and said, “Obliviate.”
So everything we see in the books on this issue is self-consistent, and consistent with what Rowling said in the interview. It's reasonable to conclude, from evidence in the books alone, that there are at least two types of Memory Charm: one called Obliviate which completely wipes memories, and another which Hermione used to modify her parents' memories.