According to jisho.org they have the same meaning. How to know which to use?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
This is one of the many cases where ancient Chinese had finer distinctions for a single concept in ancient Japanese, which lead to the same pronounciation and varied ways of writing in Japanese. As usual, there is a general one, in this case