Hi welcome to healthcare magic forum,
Sometime ear piercing may lead to infection if not carried out in a proper way.
You just take out the stud and clean the wound with spirit.Put a thick thread in place of the stud and apply local ointment like neosporin
You can take mild antiinflammatory drugs like paracetamol
1 tab two times daily for one day and observe,if no relief see a ENT specialist
to cheek any cartilage