If you're hearing thunder but not seeing lightning it could be that the lightning is too far away for you to see.
Thunder cannot happen without lightning so the lightning is there somewhere if you hear thunder but the thunder and lightning both may be happening too far away from you to see the lightning.
Thunder is the direct result of lightning.