Peter the Great was part of the Romanov Dynasty that originated in 1617 with Mikhail Deoforovich Romanov. Czar Alexis is the one who opened friendly overtures to European powers by establishing embassies in European countries: Mikhail had earlier established peace and relations with Sweden when he relinquished control of the Baltic Sea. Peter followed Alexis, after Regent Sophia resigned, and deepened the connections with and the influences of European countries.
Peter's predecessor, Feodor III, was sickly but did manage to liberalize Russia to some degree, particularly in education. During his reign, greater emphasis was also placed on merit in the awarding of positions. Following Feodor's death, the political situation in Russia was for a time unstable because of conflict between competing factions.
It was also very isolated in terms of interaction with other countries. As a result, there was not the exchange of products, new ideas for ways to do things, or the challenge of new advances in education coming into Tsarist Russia. The culture was stagnant, which did not benefit the country in any way.
Basically, Russia was backwards. One of the ways it was backwards was in social organization. It still had serfs and many merchants were not allowed to move from city to city. This was rather archaic compared to the rest of Europe and was part of the reason why Russia was relatively poor.