can you change a subnet from public to private or viceversa?

yes

how do instances in private subnet access the internet if needed?

By configure NAT GW

what is the purpose of having both public and private subnets in a VPC?

Private subnets are used to isolate sensitive resources from the public internet.
Only public subnets expose resources (e.g., web servers) that need internet access.

can instances in private subnet access the intenet?

Yes, Through NAT GW

how to determine if a subnet is private or public in AWS?

To determine if a subnet is public or private in AWS, you need to check its route table, whether it has a route to an Internet Gateway (IGW).