If the ports the PCs are using are configured in the same VLAN and if the PCs' IP configuration is correct (both in the same subnet) they should be able to ping each other. As Drew mentioned, the Pcs' firewall could be in play here. If not, then provide the port configuration of the switch and also the IP configuration of the PCs.