Thank you for your question.
If you are having an erection that does not subside and is also painful you may be suffering from a condition called priapism. This needs immediate attention from a urologist or andrologist. If the erections subside but return again frequently this can happen due to a severe infection causing pelvic congestion. Again you need to see a urologist as well as a specialist in skin and DVD to rule out sexually transmitted infection that has tracked up the genital tract. please do not hesitate to get help sooner rather than later