Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I would like to know the difference between these words, please write some example sentences.
As in Flaw's comment, あく is intransitive and ひらく can be both. The transitive form of あく is 開ける（あける）. And don't confuse 開くwith 空く（あく）which means to become vacant.
開く（あく）to be openedその店は開く
This shop is opened 開く（ひらく）to open 私は窓を開く I open a window
開く（あく）to be opened
This shop is opened
私は窓を開く I open a window