Pretty simple procedure if you've used Disk Utility before as you'll just need to create two partitions on your external HDD.
But you should think carefully over the size of your Time Machine Partition. As a general rule, the size of your external hard drive being used for Time Machine Backup should be 1.2 x the amount of data currently being used up on your Mac's internal hard drive, time machine needs the additional space in order to function.
I think it is safer to make your time machine partition 1.2 x the size of your internal hard drive (not just 1.2 x the size of data currently used), in the event that you completely fill your internal hard drive and wish to create a complete backup of the whole drive and all its data.