Just a warning here: These newer thin series are much harder to open than the previous series. Many people have shied away from trying to open let alone upgrade them. IFIXIT rates it a 2 out of 10 for repairability.
OK, your going for it ;-} here's the deal:
First to replace the RAM you'll need to take the logic board out to get to the memory sockets. Here's the IFIXIT guide on what you'll need to do: iMac Intel 21.5" EMC 2638 RAM Replacement
The SSD is a bit more involved here...
First you'll need to decide which way you're going to go here. The first option is to install the special Apple SSD into the M.2 slot which is designed for the SSD. That way you'll have a dual drive setup which you could create a Fusion drive with your HD. Only problem here is getting the correct SSD Apple is still the only source for the SSD. Both Other World Computing & Transcend so far have no options for the newer iMac's. You might be able to find a used original Apple SSD on eBay for this model but so far they are hard to find or are junk units being sold as real Apple part which they aren't and they won't work. Here's the IFIXIT guide if you can get the correct SSD: iMac Intel 21.5" EMC 2638 SSD Replacement
OK, is there something better here?? Yep! I would get a Seagate SSHD hybrid HD which while not quite as fast as a SSD it's dam close! Here you get the best of both a SSD for the high speed cache and the HD for its deep storage. Here's Seagate's web site: Seagate 2.5" SSHD's and here's the IFIXIT guide: iMac Intel 21.5" EMC 2638 Hard Drive Replacement and it will take less work.