Can I answer a closed question?
If yes, then how?
Because I am not able to answer it. I'm not sure if the Stack Exchange community allows this or not.
No, you can't answer a closed question. From the Help Center article "What does it mean if a question is "closed"?":
Closed questions cannot be answered, but can be edited to make them eligible for reopening.
You can try to edit the question so that it's a good fit for the community; if you do this within 5 days of the closure, the edit will push the question into the Reopen Votes review queue and other community members can decide whether to reopen the question or not.