How do I learn competitive programming as a beginner?

Here’s a basic road map for improving your competitive programming skills:

Find a concept that you don’t fully understand (e.g. dynamic programming, Kruskal’s Algorithm, lazy segment tree propogation, etc).
Do some research to understand the basic idea of a concept. (e.g. Greedy algorithms: solve sub-problems by always picking locally best option).
Solve problems on online judges.
Repeat step #3 until you feel confident that you can solve that kind of classical problem.
Repeat 1–4.
Here are some tips:

practice daily. Your skills will fade if you take a hiatus from practicing for more than a few days.
try really hard not to look up the solution. Once you look up the solution, the struggle of figuring out the problem is gone. It’s in the struggle where you usually learn. If you can’t solve it right now, think about it for half an hour and then come back to it tomorrow. Solve an easier problem.
books can help provide a “curriculum”. Competitive Programming by Steven and Felix Halim are popular. I worked through the first edition and can testify that it helped me immensely.

Source: (10) Raymond Deng’s answer to How do I learn competitive programming as a beginner? – Quora