Cyril and Methodius were invited by Rostislav, the ruler of the Great Moravian Empire, as a means of combating the influence of the German clergy. Their goal was to offer church service in the language of the people and translate parts of the Bible using a Slavic alphabet. At that time, Common Slavic language (praslovanský jazyk) was spoken among the Slavs. The dialects of Common Slavic had not yet diverged to form the Slavic languages that are familiar to us today. These languages in their modern form sound so similar because they all developed from the same ancestor.
Old Church Slavic (Staroslověnština) was the first written form of a Slavic language and is called Old Church Slavic because its main use was for church services. Old Church Slavic texts were written with both Cyrillic and Glagolitic alphabets across a large territory and a period of many centuries.
The Glagolitic alphabet (hlaholice) is probably the alphabet that St. Cyril invented and used originally in Moravia. Until recently, Glagolitic was still in use in certain monasteries in Croatia.
Although the Cyrillic alphabet (cyrilice) bears the name of Cyril, it was probably not invented by him. It is more likely that Cyrillic was developed later in Bulgaria by followers of Cyril and Methodius.
Old Church Slavic and Common Slavic were very similar, but Old Church Slavic is a written (and often elevated) form of the language and has a distinct South Slavic influence.