sporadically and infrequently
"he was arrogant and occasionally callous"
"open areas are only occasionally interrupted by clumps of trees"
"they visit New York on occasion"
"now and again she would take her favorite book from the shelf and read to us"
"as we drove along, the beautiful scenery now and then attracted his attention"
On the occasion of something else happening; incidentally, by the way.
"He mentioned his new job and, occasionally, that he had recently adopted a golden retriever."
In plain English: Occasionally means something happens now and then, but not very often.
"She occasionally stops for coffee on her way to work."
Usage: Use occasionally to mean sometimes or from time to time rather than frequently. Do not confuse it with incidental remarks made while discussing other topics.
Occasionally comes from the Middle English word occasional, which itself was formed by adding -ly to a term meaning "relating to an occasion." The adjective part of the phrase likely entered English via French or Latin roots describing something tied to specific events rather than happening constantly.