How can we query an Entitlement Process through Apex

Actual Object name to access from API is SlaProcess and in UI it is EntitlementProcess

SELECT Id, description, name From SlaProcess Where Name='CaseSLA'

Ideally Account will linked with Entitlement and Entitlement is linked with SlaProcess (aka EntitlementProcess).

So your query to get AccountId based on Entitlement and SlaProcess will be:

SELECT AccountId, Name 
FROM Entitlement 
WHERE SlaProcessId IN (
    SELECT Id 
    From SlaProcess 
    Where Name='CaseSLA')