Hi Jennie.
Both head and handstand require a great strength of the upper back muscles. If the strength is not sufficient, attempting to do the final version of these poses might hurt.
I would suggest to do preparatory stages of both head and hand stands for a while (not coming all the way up, practicing the dolphin pose as a preparation for headstand, asking your teacher to assist you with these two poses if you do want to come all the way up) to build more strength in your upper back.
I believe there is no point pushing yourself behind your limits if you know it will hurt. It all needs time and you will definitely be able to do the final versions of the poses later without pain.
Hope it helps and all the best!!
