You have folliculitis which is basically inflammation of the hair follicle! That's why he gave you those antibiotics (though I'm not sure why the hell he gave you a combination therapy, meaning, TWO antibiotics instead of one!).
I had that once as well but never took any antibiotics, just avoided shaving for a while, or rather shaving carefully around my neck area (especially near your adam's apple, so called thyroid gland/thyroid cartilage) and using antiseptics/ oral lozenges (in some cases you might need antibiotics if it gets serious though, mine was just starting).
I thought you were supposed to shave with the grain so that you would avoid having hair growing inwards! Anyways, I stopped shaving all together, I only use trimmers now (babyliss i-stubble+, used at the lowest number which is less than 0.5mm or equal to) and shaving machine (panasonic) for the mustache area (if I wanna make it lighter than the rest, it looks like you've just shaved or that you shaved the day before, it looks nice and ladies LOVE IT (stubble is back in fashion again!). Whenever I consider shaving, I use my shaving machine and then shave what is left with Gillette Fusion. There was a nice article on "askmen" website about shaving, where they explain that you should prepare your face before shaving (hot/warm water and use an exfoliate) and during shaving and then afterwards (a good aftershave that contains vitamin C and other ingredients that promote healing). Hope this helps.