Aspirin belongs to the class of medicines known as salicylates and NSAIDs. Aspirin functions by inhibiting the production of some natural substances that cause pain, swelling, fever, and blood clots in the body. It is also mainly used to prevent cardiovascular diseases and to relieve toothache, muscle aches, and headaches.