Please read John 15:18-25 before continuing
One of the things that I love about this verse is that it is Jesus telling us one way it will cost us to follow Him. He isn't keeping any secrets or lying to gain followers, He's telling us point blank that people will hate us because of Him. We know the risk and cost of following Jesus because He told us Himself.
Jesus is always honest with us, and not just by telling half truths because those are deceiving and since the definition of a lie is 'a statement meant to decieve' they are lies. Jesus tells us the whole truth. Jesus doesn't say, the world will hate you and that's all their is to it. He says the world will hate you because of me but if you were to abandon me and become part of the world it would love you. He gives us this option to turn away from Him just as God gave Adam the option to sin against Him because He is the perfect gentleman, never forcing His way.
So, we know that the world will hate us because it hated Jesus but this is actually a two way statement, those who love and listen to Jesus will do the same for us.
And lastly, verse 25 quotes the Old testament which is Psalm 69:4 for those who are curious.