What is a type A record?
When should I use an A record?
This type of record is ideal for pointing a domain name (or subdomain) to a server using a static IP address (i.e. one that doesn't change). To point to an IPv6 address, you'll need to use a type AAAA record.
For example
@ 10800 IN A 123.123.123.123
This record points your bare domain ("naked" or Apex), such as "example.com", without any subdomains, to the server using the IP address 123.123.123.123.
A-type record for subdomains
www 10800 IN A 123.123.123.123
This record only points to the www subdomain www (for World Wide Web) to your web server's IP address. Remember that your server must be configured to accept and redirect requests for this address.
A-type wildcard record with * (asterisk) character:
* 10800 IN A 123.123.123.123
This would point to any subdomain not yet defined to the IP address in question. It will not override a pre-defined subdomain (e.g. if you have a CNAME for www, it will continue to function normally). Any combination of characters will redirect to your site.
CAUTION, however, there are some potential drawbacks:
First of all, not all web servers can (and, for security reasons, shouldn't) accept an address not specified in advance. Don't forget that the server needs to "know" the requested address in order to "serve" the corresponding website. A "generic" address can make it easier to pirate the site by including reserved subdomains, such as the administration address of a CMS or the server itself.
Second, as any address will redirect to your website, it becomes possible for any malicious person to reference your site with an unflattering subdomain, such as thisisbad.example.com. As the number of links on the Internet and the number of clicks have an impact on referencing, this address may even manage to rank higher than your actual site.