This site is built to give a bit more information about GUIDs, there's lots of different ways of actually generating a GUID that probably fit into your day-to-day workflow better
C#
var guid = new Guid();
Java
UUID uuid = UUID.randomUUID();
Ruby
require 'securerandom' SecureRandom.uuid # As of Ruby 1.9
A GUID or UUID is a 128-bit unique reference number used in computing, a GUID follows a specific structure defined in RFC 4122 and come in a few different versions and variants.
Interested in the nuts and bolts of how GUIDs are created? We'll give you a nice overview so you don't need to get too bogged down in the spec.