This has been done widely. All countries, religions and societies have their limits as to what can be said, or written or communication by art or nowadays by computer.
Certain facts are changed or removed on purpose. This may be done because it is considered wrong, harmful, sensitive, or inconvenient to the government or other authority. This can be done for different reasons.
A censor is a person whose job is to look at all types of media and remove material. There are many reasons to censor something, like protecting military secrets, stopping immoral or anti-religious works, or keeping political power. Censorship is almost always used as an insult, and there is much debate over what censorship is and when it is okay.
When there is freedom of speech and freedom of the press, most information can published. However, even in developed countries with much freedom of the press, there are some things that cannot be published. For example, journalists are usually not allowed to publish many secrets about the military, like where troops will be sent on a mission. Pornography is censored in some countries because it is seen as not moral. For these reasons, the government might arrest anyone who publishes it.
Most often things are censored for one or more of the following reasons:
There is much debate about when censorship should be allowed. For example, U.S. President Richard Nixon censored the New York Times when they tried to publish articles about the Pentagon Papers, a group of classified military documents that showed that Nixon and the military lied about the Vietnam War. The Supreme Court in New York Times Co v. United States overturned the censorship, saying that Nixon had not shown it would be dangerous to the military, just embarrassing. In other countries, journalists and bloggers (who are usually not seen as journalists) are sometimes arrested for saying bad things about the government. In Egypt, Kareem Amer was famously arrested for insulting Islam and calling the president of Egypt, Hosni Mubarak, a dictator. 
Governments are not the only ones who censor information. For example, when the history department at Middlebury College did not allow professors to accept Wikipedia as a source in papers, some said it was censorship. This was because the department was telling professors (who usually have academic freedom) what works they should or should not accept. Sometimes, a group or a website will not allow some facts, articles, and pictures that they do not think should be seen. There is much debate over the difference between censorship and editing, that is, deciding what should or should not be published.
Sometimes there is censorship of knowledge because it is believed that the average person can be harmed by access to it.
Slate Magazine wrote that in the 18th century the French king’s council stopped the distribution of Encyclopédie because it was “destroying royal authority and encouraging a spirit of independence and revolt,”
The Chinese government has blocked the Chinese-language Wikipedia since June 2015.
On July 16, 2019 the National Post ran an article about a woman who was banned fromTwitter. Lindsay Shepherd who is described as a Free speech advocate claimed that twitter has been too eager to censor right-wing public figures. Shepherd was a teaching assistant at Wilfrid Laurier University.