Book knowledge is available everywhere, here is a small method of mine to combat nail infection: If you have swelling and pain next to the nail, it is likely to develop into nail infection, once formed, the hospital treatment is to use antibacterial and remove the nail. My experience is that when the swelling and pain appear next to the nail, use a knife to scrape the painful side of the nail thin, scraping the painful side of the nail to be softer. Be careful not to hurt the skin when scraping. If there are already pus spots – only do what was said earlier.