Yes, you can get heart palpitations when you are stressed out. Heart palpitations are the feeling you get when your heart skips a beat, flutters, or beats too fast. When you are stressed or have anxiety, your fight or flight response is triggered, where your sympathetic nervous system is activated. The activated sympathetic nervous system then activates your heart, where it can beat faster and contract harder, leading to feelings of heart palpitations. The following video explains how the fight or flight response works:
A word of caution: if you do experience heart palpitations, it is very important that you visit your doctor for an evaluation to rule out any heart problems. After medical problems are ruled out, then it could be anxiety and stress, and a referral to a psychiatrist may be in order.