You are fairly new, so I do hope you have been "lurking" and very well reading on Astral Projection and noting any potent and important methods of induction.
Yes, that is how astral projection is achieved. Some may naturally be more connected to their spiritual body or have issues staying stable and properly concluded to their physical body, only an issue of weakness in the silver cord, or astral cord as some refer to it as, and can not help but drift in to the astral plane without intention. Otherwise, consciousness is vital in astral projecting at will.
Methods of induction will differ, but many do use mediation as a light gateway to induction. So, you will want to be well aware of what meditation is, how it is done, and how you, most importantly, attempt and achieve it. Chakras may help, so unblocking these will do well, you can find many articles around the internet of it. Let energy flow properly through your body, and you should be spiritually and physically fit to astral project and expect encouraging results.