Dear friend in Christ,
An early Halloween-inspired question!
The Church has not pronounced definitively about the existence of ghosts one way or the other. There is nothing in the Catechism or the Code of Canon Law about ghosts so we turn to scripture and tradition.
In Luke 24:39, Jesus tells His disciples “Touch me and see, because a ghost does not have flesh and bones as you can see I have.” Also, for centuries the Church referred to the Third Person of the Trinity as the Holy Ghost. These would seem to indicate, at least in an implied way, the existence of ghosts.