This one is an "oldie but a goodie"!
First remove any hard pieces of wax with a butter knife.
Get some newspaper and an iron.
Place the newspaper over the wax and gently heat with the iron.
The wax should melt and soak into the newspaper and can easily be removed.
Be very careful when doing this that (a) you don't burn yourself or (b) that you don't burn/melt your carpet!