Saltpeter is KNO3 or Potassium Nitrate. Saltpeter can be gotten from Walmart, and garden centers because it is a type of fertilizer.
If you want to get saltpeter the medieval way you would either need to find a natural deposit or dig a hole in the ground and fill it with manure, add a source of potassium and water, let it sit, then allow the water to evaporate. There should be a white powder left behind if there is collect it then you will have saltpeter.