how the Schnorr signature (BIP 340) used in the taproot changes the witness data as compared to the ECDSA signatures used in legacy and Segwit transactions
In legacy and Segwit transactions, you have this:
s=(z+rd)/k
s //signature
z //hashed message (not txid)
r //signature public key (x-value of that)
d //private key
k //signature private key
Which is verified in this way:
s=(z+rd)/k
sk=z+rd
k=(z/s)+(r/s)d
R=(z/s)G+(r/s)Q
R //signature public key //R=k*G
G //secp256k1 generator
Q //public key //Q=d*G
In Schnorr signatures, it is replaced with this:
s=k+ed
s //signature
k //signature private key
e //hash of (R,Q,z) (z-value is not txid)
d //private key
Which is verified in this way:
s=k+ed
k=s-ed
R=sG-eQ
R //signature public key //R=k*G
G //secp256k1 generator
Q //public key //Q=d*G
Also, because e-value is a hash of (R,Q,z) tuple, public key recovery from legacy ECDSA cannot be applied here.
So, to sum up, you have the same secp256k1, defined in exactly the same way, but you have just some different operations on the same curve, which allows combining signatures easier. For example:
s=k+ed
s1=k1+e*d1
s2=k2+e*d2
(s1+s2)=(k1+k2)+e*(d1+d2)
And the same on public keys:
sG=R+eQ
s1*G=R1+e*Q1
s2*G=R2+e*Q2
s1*G+s2*G=R1+R2+e*Q1+e*Q2
(s1+s2)*G=(R1+R2)+e*(Q1+Q2)
For many people, it looks complicated, but you can start with some smaller elliptic curves, than secp256k1, and then, if you will understand it on some small numbers, for example where some curve uses p=79, n=67, and y^2=x^3+7 equation, then for bigger numbers, the same rules apply: there are just more computations, so breaking it is harder, because of that.
But for some smaller elliptic curves, you can easily brute-force everything, and see, how it is calculated.
You can try to make ECDSA signatures, and Schnorr signatures on these smaller curves first, before trying secp256k1:
https://bitcointalk.org/index.php?topic=5459153.0