First of all - I would like to congratulate you on beginning a journey which, if you stay the course, will lead to untold hours of pleasure, relaxation and enjoyment. But it can be daunting and painful in the beginning. Sounds to me as if you are experiencing more than the normal and usual pain encountered by new guitar students.
Even though there are many good answers here already, I have decided to add my thoughts as another answer - rather than continue simply commenting on the other answers, - for the sake of yourself and any future visitors to this site who might have a similar problem.
And if any members of the community care to disagree or add to anything in my answer, I welcome your comments. That's the beauty of this format. All answers are "peer reviewed" so to speak.
First I agree with all others who have said that the action should not contribute in any way to the problem you are experiencing. So let's rule that out as a potential solution right off the bat.
It is certainly possible that your technique could contribute to excess friction of finger against frets, but I feel it is more likely a problem with your guitar itself.
And if there is an issue with your guitar, modifying your technique to compensate for it, is not advisable in my opinion. As a beginning student, I feel it is very important for you to be learning proper technique. Having to adapt your technique because you are attempting to play a guitar that has a problem will not help you develop proper technique.
The only time I have personally experienced the particular problem you describe, or seen it happen to other beginning guitar students, is when the frets were protruding improperly, or not dressed (filed on the ends) properly. I can't say for absolute certain without seeing your guitar, but from what you describe, I would be willing to bet that it is the frets causing the scraping and raw finger.
There are two reasons the ends of the frets might be sharper or protrude more than they should. One reason could be that your guitar is mass produced by a company with less than perfect quality control and that one or more of the frets are not cut or dressed properly.
The other possibility is that the fretboard has dried (and shrunk) causing the frets to protrude. The frets could have been fine when the guitar left the factory, but if the instrument was stored or kept in an environment with less than 45% relative humidity, the fingerboard (fretboard) could shrink as it loses moisture. This will cause most or all of the frets (not just one or two) to protrude more than normal and scrape your fingers as you slide up and down the neck.
Or it could be a combination of both.
If you believe the protruding fret problem is solely due to lack of proper humidity, then re-hydrating your guitar may correct the problem. Since you would need to re-hydrate the fret board, and you might be playing an electric guitar, a room humidifier will be the most effective way to re-hydrate your guitar's fretboard. For re-hydrating, you will want to store your guitar in a room or case where you can achieve 50% humidity. Too much is not good either. Anything less than 40% and you will likely begin to see the problems associated with a dry guitar (such as sharp frets).
In addition to re-hydrating, a good fret board conditioning oil can be applied after your fret board is fully re-hydrated. This will help slow down future drying. But wait until you have completed the re-hydrating process which may take several days. The oil can work in both directions preventing the absorption of moisture as well as the loss. During re-hydration you WANT the fret board to absorb moisture.
If only one or two frets is sharp or protruding more than the others, your problem is more likely due to a fret or two that may need some attention. It's possible for a fret to become loose and stick up more than it should. When that happens you will often get string buzz in addition to nicks in your index finger. When a fret becomes loose, it will be necessary to re-set the fret. Sometimes a guitar tech can tap the loose fret with a hammer (with the neck properly supported), and re-seat it, but often the fret must be removed and replaced if the tang is damaged or the tech may put a bit of glue in the fret slot to hold it in place if the slot is larger than it should be. After replacing the fret, the tech should crown and polish the fret and dress the ends. They will use a gauge or plane to insure that the height of the fret is even with the other frets.
On many of the lower priced guitars I have seen, some (or sometimes all) of the frets have not been properly cut or dressed on the ends. You should be able to run your index (or any other) finger along the bottom edge of your fret board with your finger angled towards or even slightly touching the high e string, and feel only bumps where the fret ends are. They should be relatively smooth. If you run your finger along the edge of the fret board and it feels like one or more of the fret's are scraping or cutting your finger, you have a problem that needs attention!
Fret dressing is something that is ideally done with the correct type file and the fret end must be filed at the correct angle. The wrong file may make the fret end feel rough and the wrong angle can either leave the ends in a finger scraping orientation or - too much of an angle can lead to the string slipping off the end of the fret.
I own over a dozen guitars presently and do most of my own set up work. But when one of my guitars needs any type of fretwork, I take it to one of my friends who are luthiers (build and repair guitars) who have the proper tools and expertise to do it properly without damaging the guitar.
Depending on how many frets are a problem, and if it cannot be solved with re-hydrating your fret board, it could cost more to have a professional correct the problem than you want to spend - if your guitar did not cost very much to begin with.
Then you might try to sell your guitar and use the money to buy one that you can play without scraping your finger. Or if your conscious will not allow you to sell a problem guitar, before you buy a new one, you could try filing the frets yourself - after doing a little research to learn what type file to use and what angle to shoot for. Then if the problem is even worse or new problems arise from your attempts at DIY guitar repair, you will now have the perfect excuse to buy a new guitar.
Just be sure before you purchase another guitar, to use the index finger test described above, and if you discover sharp frets, don't buy that one!
Whatever you do, please try to get this problem solved before you do any further damage to your finger, or your technique (or worse - to your enthusiasm for learning to play). Learning guitar has enough unavoidable pain factors without adding any that can and should be corrected.
I wish you much success as you continue your journey.