The embeddings used in search index and query are defined by the user. You define the embedding dimension of your chosen embedding model in the Search index definition. More steps here: https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/
The Atlas Vector Search index uses an underlying ANN algorithm (HNSW) for doing the approx search for k nearest neighbors among the indexed docs, for the user given query.