GUIDs are represented in WoW as hexadecimal strings beginning with '0x' -- this prefix is not part of the data, but merely signifies that what follows is a hexadecimal number. GUIDs are intended to provide a unique way to identify units; the following general rules apply: [1]

A monster has a single GUID from spawn until death (or despawn). When it respawns it gets a new GUID.

Pets get a new GUID each time they are summoned.

Monster and pet GUIDs can be recycled after server (or instance) restart.

Players keep their GUID forever, and are unique even in cross-server battlegrounds.

However, units that "transform" into other units may not switch GUID immediately.

A GUID can be thought of as being composed of multiple pieces of data. Consider "0xAABCCCDDDDEEEEEE", where:

AA

unknown; Possible battlegroup identifier when used for players.

B

unit type, mask with 0x7 to get: 0 for players, 1 for world objects, 3 for NPCs, 4 for permanent pets (including Water Elemental), 5 for vehicles. Temporary pets (Treants, Spirit Wolves, Mirror Images, and Ghouls) are considered NPCs (3), even if talents or glyphs prevent them from expiring.

NOTE: According to my personal analysis, I found that the number stands for players should be 8 instead of 0. I don't know if this is a newly update.

NOTE: On the server Alexstraza I have seen the 1st 3 numbers be 040, meaning you must mask with 0x7 and 0=player, not 8.

CORRECTION: If you have masked with 0x7 then the result CANNOT be 8. Masking 8 with 0x7 gives 0. It seems reasonable to conclude that the original poster is correct.

CCC

If the unit is a pet, CCCDDDD forms a unique ID for the pet based on creation order; if a world object, CCCDDDD is the object ID; otherwise unknown.

DDDD

If the unit is an NPC, this is the hexadecimal representation of the NPC id.

EEEEEE

If the unit is a player, this is a unique identifier based on creation order. Otherwise, this is a spawn counter based on spawn order.(For players it can be 7 digits long, so that its DEEEEEE)

First of all, let's find out what kind of unit it is. Take the first three digits in the GUID, ie "F53" (or 0xF53 to show it's an hex value) and apply an AND mask of 0x007 to get 0x003. This GUID is for a normal NPC, neither a pet nor a player.

We can also extract the Unit ID by taking the seventh to tenth digit and converting it to decimal form: "4D2B", or converted to decimal form "19755". A quick visit to wowhead shows that the NPC with that id is "Mo'arg Weaponsmith", [2]. All "Mo'arg Weaponsmiths" will have that id to identify them.

The last six digits, "008852" is the spawn counter. There will never be two "Mo'arg Weaponsmith", possible even never two mobs in the outside world, with the same spawn number. This spawn counter, combined with the rest makes it possible to always refer to exactly this "Mo'arg Weaponsmith", and not the one next to it.

A simple in game script command can be used to get the NPC ID from your target: Target NPC ID: 19755

Player GUIDs are local on a per-server basis, making the "global" scope to be bound to the specific server. Every time a character is created, a new GUID is assigned from a simple +1 counter and then given to that character. It should be noted that the act of transferring characters, either server to server, account to account, or even account to account while remaining on the same server will generate a new character GUID, because of how the process works (the character "ceases to exist" for a short period, and is then recreated). This act erases friend and ignore lists. Renaming a character does not trigger a new GUID, as that process is much simpler than a full character move.

Uniqueness is guaranteed in cross-realm battlegrounds by masking the player GUID with a server specific unique identifier, when needed.

NPC GUID collisions have also been observed. It is unknown why or when in specific they occur, but differing mob types have had a NPC ID number which corresponded to an entirely different NPC. This is considered a very rare phenomenon.