Am I right with the following interpretation?
I got to thinking about what we can learn from him.
The underlined part could be replaced with the following:
I was thinking...
I happened to think...
No. It means 'I began thinking/to think...'