Walking Ballista enters the battlefield with X +1/+1 counters on it.
{4}: Put a +1/+1 counter on Walking Ballista.
Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to any target.
A casting cost of {X}{X} means that you pay twice X. If you want X to be 3, you pay {6} to cast Walking Ballista.
If Walking Ballista has been dealt damage or had its toughness reduced by an effect, this limits how many times you'll be able to remove +1/+1 counters from it in a single turn. For example, if it has three +1/+1 counters on it and has been dealt 1 damage this turn, it will be destroyed immediately after you activate the ability a second time and you won't be able to activate it a third time.