Both terms have a range of usage.
Idealism in particular covers a wide spectrum of viewpoints.
In general, it is the view that some other aspect of our universe is primary to material.
However, as to WHAT is the "more real" basis of reality, there is a variety of ideas.
One major branch of Idealist thinking is that abstractions of various kinds are more real than matter, and matter is derivative.
- One family of abstract thinking is Platonism -- that there are Ideals that all specific examples (including our material world) are just reflections of.
- Another branch of abstract thinking is that logic and logic relations are primary, and matter is spawned by them.
One version of logic primacy is math primacy -- that all physics reduces to math, and math is therefore what is "real".
Another form of logic primacy is "logical necessity", which is the basis for Thomist theology
A third form of logical primacy is the view that "relationships" are primary over objects, and are the more fundamental reality that spawns matter.
Process Philosophy hold that processes are more primary than matter (or possibly than logic). This is kind of a variant on "logic primary" if one treats processes as somehow "logic", but the lack of a time term in logic makes this a suspect inference, to my mind.
Another approach also called idealism holds that consciousness or awareness is the primary aspect of our universe. This has a lot of variants:
- Buddhist thinking is that our awareness is real, and the material world we think is around us is a delusion
- The Perennial Philosophy is that there is a Mind at Large, which thinks the universe into existence. PP has delusion as a key feature as well (of our separation from MAL, and of the reality of matter)
- There are viewpoints that mind is primary, but that our world is generated by a kind of weighted integration of all conscious expectations. Much New Age thinking falls into this approach to mind/matter.
- A further version of Idealism is not ontological, but epistemological. It is to hold that our knowledge is based upon perception, hence epistemologically perception (mind, consciousness) is primary. One can INFER the reality of matter if one wants, but that is a far less "real" real than perceptions are. Kant held by this version of Idealism, and it was continued into the 20th century by the Phenomenalogic movement.
Spiritualism is the view that spirits are causal agents in this world
Again, there are a lot of spiritualism views.
All of the "consciousness is primary" views above are implicitly spiritualist. But the Perennial Philosophy would hold that our belief in our agency is a delusion, so while it is spiritualist in general category, it generally rejects the agency assumptions of humans or discarnate as spirits.
However, most Spiritualism is dualist, not idealist.
There was a widespread view which was referred to as Spiritualism in the 1800s, which focused on communications with, and the agency of, discarnate spirits, primarily of dead humans. This movement has continued thru today and is exemplified by channelers.
This movement is still reasonably widely followed in Brazil, where Spiritualism is a recognized religion.
The assumptions behind shamanism, and behind Wiccan practices, are generally dualist as well.