As 'nyxielle' said but there are times when they are not the same.
Take these sentences:
'The idea never occurred to me'
'It had occurred to me that this wasn't going to be a walk in the park'
When occurred is used like this, in the sense of coming to mind, you cannot substitute it with happen :)