'pastoral' derives from the Latin word meaning 'relating to a shepherd'. In the Christian religion, there is the image of people as sheep, and their priest or minister guarding over their souls, saving them from the Devil, just like a good shepherd protects his flock from wolves. Hence, with regard to the Church, 'pastoral' means "concerning or appropriate to the giving of spiritual guidance". (As well, in some Churches, the minister is refer to as the 'pastor'.)
Literally, though, shepherds and sheep are associated with rural areas, and the countryside. So that 'pastoral' in this sense means "used for or related to the keeping or grazing of sheep or cattle; associated with country life." We might say, "The view was pastoral, with rolling fields and grazing sheep."
In literature, the word is used to depict an idealized version of country life.
Student or Learner