That is an attribute
– see this article
] for a good introduction to them.
E: Attributes allow you to add declarative metadata to elements, in addition to the normal type system metadata included in the declaration itself. Attributes don't generally do anything, they are just static information within the assembly, but various parts of the framework (including the compiler and the OS) look at some of them (e.g. [Obsolete], [Serializable], [AssemblyVersion]) and alter their behaviour accordingly.
You can create new attributes by inheriting from Attribute, but they don't do anything – you then need to write code to inspect elements (through reflection generally) for attributes and change your logic accordingly. This can result in very elegant 'end user' code, marking fields as e.g. columns in an output data table, or to be packaged up in a TCP message, etc, but at the cost of a bit of performance and also some rather messy code in the part of the application that manages the logic based on attributes.
[DllImport] is used by the framework to cue it on what to try to load when it resolves the method (at runtime, I think, not sure about that though).