Take a look at altank's answer in this thread:https://answers.squarespace.com/questions/9451/how-can-i-add-jquery-to-my-site.html
If you want to style the accordion to look like the image, you will need to use CSS.
Looks like a job for Markdown blocks. Check out this article from Silva Bokis:
http://www.silvabokis.com/squarespace-tips/how-to-create-hideshow-faqs-in-squarespace