Novice question: what are attributes in VHDL?
Constants stand alone : you can create them of any type with any valid value for that type. A typical use is the DRY principle : name a quantity once (by declaring a constant) and reuse the named constant wherever you need the quantity. Makes understanding and especially maintenance easier.

VHDL Attributes are always attributes of something. While you can declare your own attributes and attach them to objects, most use is of predefined attributes, whose values are taken directly from the attached object.

So if you are handed an array you can determine its first and last indices, its length, or its range (the datatype used to index it), and so on without having to pass a bunch of other numbers around. Or worse, read the whole thing to find the first NUL character in it!

So for example the range attribute gives the type of the index variable, and you can write functions like

procedure foo (a : array (integer range &lt;&gt;) of integer) is
begin
  for i in a'range loop
    a(i) := ...
  end loop;
end foo;


and it correctly iterates over any array you can pass it as a parameter.

For more than this sketch, get a good VHDL book such as Ashenden's "Designer's Guide to VHDL"

EDIT: A common use of user-created attributes is to attach new, uh, attributes to an object. In the example the new attribute is a boolean, and only the two named objects (signals in this case) carry it. 

In this case, the attributes are probably documented in the synthesis tool manual (they are specific to that tool), and the tool will treat any signals carrying that attribute in a special manner; at a guess, preserving those signals and keeping their original name attached, so that they are easier to find in the compiled design. See also "Chipscope" an embedded logic analysis tool, mentioned in Martin's answer to your other question. I would expect Chipscope to find these signals easily.

This is important because synthesis tools are usually aggressive optimisers; if the signal was provably unused or a duplicate of another signal, it would be deleted altogether without the attribute.