The key to effective 3betting is thinking about what you're trying to accomplish when you do it. This explains the basics pretty well.
3x in position and 4x out of position is pretty standard, I believe, but again, it depends on what you want to accomplish and who you're playing against.
When you have AK or AQ and get 4bet, it depends on who 4bet you. Usually you can call, but if you're up against a donk with 0% fold to 3bet and is 4betting 30% of the time, or something like that. Then you are still ahead of his range and you can shove, raise, or whatever. You probably need a HUD to be really confident about when you're ahead though.