Most of us probably first learned goofball as a term for a silly or goofy person. In my experience, goofball is used mostly by adults talking to children ("you're such a goofball"), although anyone is free to call anyone else a goofball. You might hear someone refer to another person's goofball sense of humor, goofball antics, or goofball charm. Generally it's a good (although goofy) thing.

Goofball can also be used to refer to a stupid or eccentric person, although this is less common.

Strangely, there is not much etymological information about the word goofball, but it probably originated in America (the birthplace of the word goof), in the late 1930s to refer to narcotics. It first started being used in the sense of a goofy person in 1959. I suspect that the goofy sense of goofball arose independently from the drug reference; screwball (meaning an eccentric person) had been in use since 1933; oddball had been around since the 1940s. Goof had been around since 1906. The jump from screwball and oddball to goofball was a small one*.


* I haven't been able to find any dates for nutball, sleazeball, greaseball, or slimeball, but clearly the suffix -ball is quite popular amongst slangsters.

References:
www.etymonline.com
dictionary.reference.com