How to get backlinks from blog commenting? Is it like commenting on others blog content and putting my link in comment? I am new in SEO.
No don't put your link in comment. Blogs allow you to put your name and website URL. That URL will work as a back link for you and you will get traffic from commenting on blogs.
On a negative note, yes it is a spammy way of SEO and avoid getting too much into it. On a positive note, posting comments on highly informative articles is still a good thing to do. You should only post informative and useful comments as well. Posting other helpful information also works as people tend to follow you or visit your website should you have something that would help.
blog commenting on topics related to your link will definitely help for both backlinks as well as traffic but spam commenting will help but not much as it may be just for 1 or 2 times.