In the subsection about attacking (as opposed to the subsection about spellcasting), it says:
A few spells also involve making a melee attack.
When you make a ranged attack, you fire a bow or a
crossbow, hurl a handaxe, or otherwise send projectiles
to strike a foe at a distance. A monster might shoot
spines from its tail. Many spells also involve making a
ranged attack. -PHB 195
So, spells with attack rolls should count as "attacks", right?
Your familiar acts independently of you, but it always
obeys your commands. In combat, it rolls its own
initiative and acts on its own turn. A familiar can’t
attack, but it can take other actions as normal.
Finally, when you cast a spell with a range of touch,
your familiar can deliver the spell as if it had cast the
spell. Your familiar must be within 100 feet of you, and
it must use its reaction to deliver the spell when you cast
it. If the spell requires an attack roll, you use your attack
modifier for the roll.
-PHB 240 find familiar spell
So this indicates that a spell with an attack roll is not an "attack", otherwise a familiar couldn't perform it, right?
The spellcasting section (as opposed to the attacking section) says:
Some spells require the caster to make an attack roll
to determine whether the spell effect hits the intended
target. Your attack bonus with a spell attack equals your
spellcasting ability modifier + your proficiency bonus.
Most spells that require attack rolls involve ranged
attacks. Remember that you have disadvantage on a
ranged attack roll if you are within 5 feet of a hostile
creature that can see you and that isn’t incapacitated
(see chapter 9). -PHB 205
Under the warlock class it says:
Additionally, when you take the Attack action, you can
forgo one of your own attacks to allow your familiar to
make one attack of its own. -PHB 107 pact of chain
So basically how does this work for casting through familiars?
What kind of actions does it take for the various options?
Also, are the only spells familiars can cast touch spells, or if a spell is counted as a ranged attack, can I cast it through the familiar by forgoing one of my actions?