Energy providers have a cooling-off period of 14 days, which starts from the date you submit your switch. Some suppliers may start processing the switch during this period, though you still have the right to cancel penalty-free.
The switch process can take up to four to six weeks to complete, depending on supplier, although many will now switch you more quickly.
But don't worry, you won't lose your supply during this time. It should be a seamless handover from one provider to the other. All that's really changing is the billing, not the actual gas and electricity you're supplied.
Energy suppliers are supposed to keep you updated on your switch (via letter/telephone/email - please keep an eye on your junk/spam folder). If you ever have any queries about your switch, you can always contact your energy supplier for an update.