Chemical signals on the surface of an item (food, predator, other object) are detected by receptors on the surface of the amoeba. The amoeba then decides using chemical signalling/pathways if this is something to go towards or to avoid and reacts accordingly. They sense the direction to move towards food based on the concentration of chemical signals - the stronger/more numerous the chemical signals, the more likely the food is in that direction so the amoeba will move towards that point.