The main answer to this question is in Harry Potter and the Philosopher's Stone, in a conversation between Hagrid and Harry, in the chapter Diagon Alley:
‘But what does a Ministry of Magic do?’
‘Well, their main job is to keep it from the Muggles that there’s still witches an’ wizards up an’ down the country.’
‘Why? Blimey, Harry, everyone’d be wantin’ magic solutions to their problems. Nah, we’re best left alone.’
Philosopher's Stone - page 51 - British Hardcover
Edited to add: I found some additional canon information regarding this topic. In Tales of Beedle the Bard, Albus Dumbledore follows each story with his written thoughts and an analysis of each story. After The Wizard and the Hopping Pot, Dumbledore offers the following insights:
The persecution of witches and wizards was gathering pace all over Europe in the early fifteenth century. [SNIP] "Let the Muggles manage without us!" was the cry, as the wizards drew further and further apart from their non-magical brethren, culminating with the institution of the International Statute of Wizarding Secrecy in 1689, when wizardkind voluntarily went underground.
Tales of Beedle the Bard - page 40 to 41 - US Collector's Edition
As the witch-hunts grew ever fiercer, wizarding families began to live double lives, using charms of concealment to protect themselves and their families. By the seventeeth [sic] century, any witch or wizard who chose to fraternise with Muggles became suspect, even an outcast in his or her own community. Among the many insults hurled at pro-Muggle witches and wizards (such fruity epithets as 'Mudwallower,' 'Dunglicker,' and 'Scumsucker' date from this period), was the charge of having weak or inferior magic.
Tales of Beedle the Bard - page 43 to 44 - US Collector's Edition
Influential wizards of the day, such as Brutus Malfoy, editor of Warlock at War, and anti-Muggle periodical, perpetuated the stereotype that a Muggle-lover was about as magical as a Squib. Brutus wrote:
'This we may state with certainty: any wizard who shows fondness for the society of Muggles is of low intelligence, with magic so feeble and pitiful that he can only feel himself superior if surrounded by Muggle pigmen. Nothing is a surer sign of weak magic than a weakness for non-magical company.'
Tales of Beedle the Bard - page 44 to 46 - US Collector's Edition
Dumbledore's notes on The Wizard and the Hopping Pot do go into a little more detail regarding Muggle persecution of witches and wizards. He mentions that Nearly Headless Nick was stripped of his wand prior to being thrown in a dungeon to await execution and was unable to magic himself out of the predicament. Further, the younger the witch or wizard, the more at risk they were to execution, due to their lesser ability to control their magic (as seen with Ariana Dumbledore and her subsequent attack by three Muggle boys after they witnessed her doing magic and Ariana was unable to reproduce the trick at the boys' demand). See page 41 in Tales of Beedle the Bard for complete details.