Is it safe to get pedicure at the nail salon?

Sort of. Some (not all) nail salons cut corners, and in doing so, spread infections from one customer to the next. For example, they are required in most states to use emery boards only once and throw them away, but many reuse them. Many salons don't sterilize their instruments properly. A wise precaution is to buy your own nail instruments and bring them with you each time you go to the salon.
Can be. You should look for a nail salon that assigns you and has you pay extra the first visit to have your own 'tools' so that you are not sharing potential fungi.