Thank you for your query on Healthcare Magic.
Hemorrhoids are usually painless.
Painful swelling could be due to a sentinel pile which is seen in people with fissure formation.
Fissures develop due to constipation
I suggest you to take a diet with high dietary fiber
Consult the doctor for local examination of rectum
to know the type of swelling.
It wont go by itself and any underlying problem such as constipation has to be treated.
Therefore I suggest you to consult the doctor for examination.
Hope I have answered your query.