Try closing your windows for a few days – i.e. if it comes in at night, close them at night. It will soon realise that there is no way in and stop trying.
Otherwise, if you see it when it comes in, try a simple plant sprayer or just spray water at it – cats do not like water and understand human actions very well. It will soon get the idea that you do not want it coming and stop.
Make sure there is no food lying around that is tempting it, or anyone else in your house who is encouraging it in without your knowledge.
Of course, talking with your neighbour about it helps too!
Whatever you do, do not hit the cat! Be kind to the animal, it has no ill intention.