Hi Gulshan Negi,
I've read the article you linked and I think it gives a good general idea of what website personalization is and it has quite a few examples of how it would look like.
Even at the end of the article, there are a few mentioned (free and paid) services that offer website personalization and even an agency specialized in this.
So how programming can play a role? People had to create these services and the website using them needs a way to interface with these services, so you need programmers and software engineers on both sides: to provide the services and to utilize them in the websites.
I am not particularly familiar with web development, but common sense (and the article) suggests that data is collected from the visitors of the website about their use of the site and about their "real life" (could be location, age, gender, ads history, shopping habits, linked services -- e.g. Facebook profile, Amazon account, etc, anything the customer is willing to share) and based on this information a profile is formed of the customer and stored about them which in return helps the site to offer products and services that is thought (based on the data gathered) to be of interest for these customers.
Just to come up with my own example: if you're operating a video streaming service and you find that your customer often watches sci-fi shows on their other streaming services (e.g. Netflix, AppleTV+, etc) and they have visited IMDB before looking up various series in the sci-fi category and their browser history also shows interest in upcoming science fictions, then you would be wise to offer them this content on the start page of your site to maximize the potential of them purchasing sci-fi movies and series from your video streaming service.
How exactly programming plays a role in this is not quite a specific question as you'll need to cover lots of disciplines (web development, data collection, data storage, data analysis, AI, and whatnot).
I hope this helps. If you have specific question (again, I'm not a web developer), ask away.