Uses
Slimeballs combine with the simple piston to make sticky pistons. A piston is a mechanism that pushes blocks when triggered. Placing a slimeball in the crafting window with a piston turns it into a sticky piston. Sticky pistons are able to push and pull blocks directly ahead of them. Some multiplayer servers use slimeballs as a form of currency for purchasing items due to their lack of uses and relative difficulty to obtain.
How to Obtain Slimeballs
Slimeballs are dropped from slimes. Slimes only drop slimeballs when they are killed in their smallest form. When you punch a slime, they die and break down into several smaller pieces. Only the smallest slimes drop items. Attacking a slime with a bow or sword will sometimes kill the slime without prompting it to break down into smaller pieces. Always fight slimes unarmed to guarantee you get slimeballs from them. Each slime drops 0-2 slimeballs when it is killed.
Slimes
Slimes are different from all other creatures in Minecraft because they have very strange and specific requirements to spawn. Slimes only appear in the bottom 16 layers of the map, but have no lighting requirement unlike other creatures. They can be one of four different sizes when they spawn, with the largest being a four block cube. In addition to the other rules, only a small percentage of "chunks" are capable of spawning slimes. Chunks are 16 by 16 block squares that have their own individual information.
Slime Spawning Rooms
It is extremely hard to find slimes in the wild, so the best option to farm slimeballs is to create a spawning room. A slime spawning room is a gigantic room or tunnel at a very low level on the map that will create only slimes. Find a spot where slimes have appeared before and dig out a room at least five blocks tall and nine blocks wide. If you haven't found any slimes, make this room into a long tunnel to increase your chances of running into a chunk that will spawn slimes.