What is a novelty in a computer science PhD' I'm now on my final year of my PhD in Computer Science (CS).

Unfortunately, I'm still confused with what is considered as a novelty in CS.

Some people say I have to develop a new algorithm and not applying an existing algorithm.

Some people say it is still novelty even if I apply the existing algorithms to solve some problems in my area.

Some people say if someone else method from another area can work in my area, and that particular method haven't been explored in my area, it is still considered as a novelty.

So,  now I am confused at my stage. What does it mean as a novelty in Computer Science PhD research? What it is considered as a novelty to pass the PhD?

I am also advised to present four contributions in my PhD to graduate. And, for each contribution, I put it as one chapter in my thesis. Each contribution is a new thing and published in a journal/conference. It is true? Why I can see some PhD works do not have these four chapters?
In computer science, perception of novelty varies greatly by subfield. In theory, they would consider a new algorithm a novel contribution. In other subfields like bioinformatics or compilers, a new application of an algorithm to a problem would be considered a novel contribution. In Human-computer interaction, improving our knowledge on how people interact with certain types of user interfaces would be a novel contribution. People doing research in architecture, graphics, networking, systems, etc. each have their own notion of what novelty means.

Your adviser is the best person to ask what constitutes a novel contribution in your subfield.

Standards for how much novel work you need to earn the PhD degree vary by University and by adviser. I've seen 100 page dissertations and 500 page dissertations. I've seen dissertations that don't seem to add much more than a single journal paper would, and I've seen dissertations that completely crack open a whole new field of research. 

Of course, you will have to meet whatever standards are set by your University and thesis committee. If you think their requirements are unreasonable or unfair, feel free to ask another question.