In these verses, Jesus uses a whole series of illustrations to convey His message, which is that the way to know a person's heart is to look at the teachers of the person. When one has learned lessons well from his/her teacher, that person's thoughts and actions will reflect the ways of the teacher: "everyone who is fully trained will be like his teacher." (Luke 6:40b)
Verses 43-44 use comparisons from the plant kingdom to express the idea. In a part of the world and period in time when agriculture would have been very familiar to most of Jesus's listeners, His audience would have easily understood His point when He said, "People do not pick figs from thornbushes, or grapes from briers." (Luke 6:44b) By looking to a person's upbringing and origins, you will be able to know a great deal about the person's true nature.
The good man brings good things out of the good stored up in his heart, and the evil man brings evil things out of the evil stored up in his heart. (Luke 6:45a)