Bad describes a noun (a bad day, bad food), while badly describes how an action was performed (managed badly) or intensifies a verb (badly wanted to win). The classic trap is "I feel badly," which technically claims your sense of touch is impaired — "I feel bad" is what most people mean. If you're describing a thing, use bad; if you're describing how something was done, use badly.
The core difference
Bad is an adjective for nouns; badly is the adverb for verbs, or a way of saying "a great deal."
- bad — of low quality, unpleasant, or faulty (adjective): The food at that restaurant was surprisingly bad.
- badly — in a poor or incorrect way (adverb): The project was managed badly from the very start.
- badly — to a great degree; very much: She badly wanted to win the competition.
How to tell them apart
The usual test is the same one that separates good from well: an adjective like bad describes a noun (the food was bad, a bad headache), while an adverb like badly describes how a verb happens (the project was managed badly). Because badly is longer and "sounds more careful," people sometimes reach for it after linking verbs like feel or look, producing the classic error "I feel badly about it." Strictly, feel here is a linking verb describing your state, so it takes the adjective — "I feel bad about it" is the version to use.
Badly also does a second job as an intensifier, meaning "very much," as in she badly wanted to win the competition. In that use it isn't describing quality at all, just strength of feeling — a useful reminder that badly isn't simply "bad, but as an adverb."