IPv6 addresses have their own formatting system because they represent an 128-bit addressing space: that's 16 octets, which would be extremely unwieldly! As well, at this time there are a lot of runs of embedded zeroes, so it's handy to be able to compress those out. To indicate that octets aren't being used, a colon is used instead of a period; as well, hexadecimal digits are used instead of decimal.
An IPv6 address looks like the following:
aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh[%int][/netmask]
netmask works the same as IPv4, except that it can go up to 128.
The %int is required for scoped addresses, which are not global addresses and only have meaning inside a local network, and specifies which network interface owns the address as two interfaces may have the same address.
Leading zeroes are allowed to be omitted, and a single run of zeroes in an address (the longest one, by convention) can be compressed by using :::
2001:0db8:1523:0000:1334:0000:0000:0193
Leading zeroes removed: 2001:db8:1523:0:1334:0:0:193
Longest run of zeroes compressed: 2001:db8:1523:0:1334::193
There are some special cases:
Any address that starts completely with zeroes can be compressed to ::, then the non-zero portion (0:0:0:0:0:0:0:0/128 becomes ::/128 and 0:0:0:0:0:0:0:1/128 becomes ::1/128).
IPv4-compatible and IPv4-mapped IPv6 addresses look like ::a.b.c.d/96 and ::ffff:a.b.c.d/96 (or ::ffff:aabb:ccdd/96).
For your /etc/hosts usage, almost nothing changes between IPv4 and IPv6 addresses: you won't have to worry about the network mask, and almost certainly won't have to worry about scoped addresses or IPv4-compatible addresses. Just follow the zero-compression rules and you should usually be fine. If you have a dual-homed address (where a host listens to both IPv4 and IPv6), you will have to enter it twice, once for the IPv4 address and once for the IPv6 address:
::1 localhost 127.0.0.1 localhost 2001:db8:123:456::78 example.com www.example.com 192.0.2.56 example.com www.example.com fe80::12:34:56:78%eth0 printer.example.com
I won't discuss network masks and ranges, but if you want a reference to the standard ranges, RIPE produced a PDF with them if you would like a quick overview of them.