you may need an ECG. Does it happen when you're at rest? You can start by taking your own pulse rate. Press on the inner aspect of your wrist with two finger pads and count the beats per minute. Normal rate should be 60-100 beats per minute. If your pulse rate exceeds this, then rest for a bit and then take it again.
It may also be that you need to be drinking more water. Low water content in your body can also cause faster heart rate because your body is compensating. But it's really best to visit a specialist in order to determine what may be causing this so you can take the necessary steps to prevent it from recurring.
Magbasa pa