The condition is called paraphimosis and there is possibly a constriction ring which is preventing the foreskin to go back to it's original position because of the edema and swelling.
Next Steps
it needs reduction of paraphimosis. in case the edema is excessive, circumcision may be required.
Health Tips
consult a trained urologist as soon as possible